Forums » Software Development »
Cloning SD Card
Added by R D about 12 years ago
What is the easiest way to clone a bootable sd card image?
Unfortunately, cannot figure out how to even read the sd card in Virtual Box since the reader isn't a USB device in new PCs.
Thanks,
Randy
Replies (1)
RE: Cloning SD Card - Added by Tim Iskander about 12 years ago
Randy
The most straight-forward way to do it is on a linux box using dd
find the drive associated with the reader using dmesg | tail
and look for something like
[ 335.316290] sd 3:0:0:0: [sdb] Attached SCSI removable disk
then create an image of the card (you will need whatever the card capacity is in free space)sudo dd if=/dev/sdb of=/home/randy/sd-card.bin
and then replace the original card with the new one and reverse the processsudo dd if=/home/randy/sd-card.bin of=/dev/sdb
be VERY careful to make sure the of= part of that command really points to your sd card (i.e. It will almost never be /dev/sda)
Of course this assumes you have access to an SD card reader from a linux box, which you may not (as implied in your post).
You can do this on your dev board if you boot from an NFS filesystem as explained in the ARM9 Linux Root Filesystem page
Then the SD card is /dev/mmcblk0, and your home directory will be NFS mounted from the virtual machine.
This process is S-L-O-W, but does work.
There are methods to cut the amount of data transferred and thus speed the process up, but they get more involved and can be error prone.
Hope this helps..
cheers
/Tim