Somehow, yet to be determined, I destroyed one of my RPI’s. I needed to buy a replacement for the old malfunctioning Raspberry Pi model B.
The easiest thing to do would be to buy another model B and just move the SD card to the new RPI. But, already, there is a $10 premium on the old models. Since this happens to be the RPI I use for most experimenting, I would kind of like it to be the latest and greatest anyway. So I ordered a Model B+.
The downside to ordering a model B+ is it uses a microSD card so I can’t just stick the old SD card in. In fact, if the O/S on the old card is very old, it isn’t going to work anyway.
I have a lot of installed software and my own stuff on this RPI. I don’t want to rebuild it from scratch if I can help it. So, the contents of the old card need to be moved to a new microSD.
First, you need to get a new microSD that is at least as big as the old SD card. My old card is 16GB so I purchased a 16GB microSD. Also, you should consider getting a class 10 card – the data transfer is much faster than a class 4.
On other thing to consider is getting the card from the same manufacturer, especially if the new card is the same size as the old card. I have found at least one case where a Transcend card was a little larger than a Sandisk card which prevented me from doing the copy.
For my situation, I have a 16GB Sandisk SD card and I bought a new 16GB Sandisk microSD card.
Update O/S on the Old SD Card
Some of the Model B+’s drivers are different than the Model B. These drivers may not be on your old SD Card. To make sure they are there, you need to do the following:
sudo apt-get update sudo apt-get upgrade sudo poweroff
The old SD card is ready to be copied.
Copy SD card to PC
If the new card is >= the size of the old card, then you can simply use Win32DiskImager to copy the old card.
It’s a really good idea to set the switch to read-only mode on the old SD card. I have managed to write to the wrong card in the past which makes for a lousy rest of the day!
First, copy the old card to a file on your PC’s hard drive:
Now, exit Win32DiskImager and remove the old SD card.
Copy from PC to microSD Card
Then insert the new microSD card into your PC and start Win32DiskImager again:
Press the write button and the data is written to the new microSD card.
In most circumstances, this is all you need to do. The copy will finish fine and you can put the microSD into the model B+ and boot.
Doing this Upgrade I had no problem, so I don’t have specific instructions for dealing with a copy failure.
But, I did have a copy failure when trying to copy SD to SD which was covered in this post:
Jump to the section, ‘Transferring the O/S the Hard Way’. Those notes cover how to manually copy partitions using linux and the dd command.