How to clone micro SD card
Solution 1
On Linux you can use dd
to do that.
dd if=/dev/sdcard1 of=/dev/sdcard2
where if
is the origin and of
the destination SDs.
or if you want to take the image first and copy it to 2nd SD after:
dd if=/dev/sdcard1 of=~/sdimage
dd if=~/sdimage of=/dev/sdcard2
Solution 2
You could use Clonezilla, which is a small Linux live distro which allows you to create drive images or to exactly copy one drive to another.
Solution 3
Just use dd for Windows (http://www.chrysocome.net/dd).
Run CDM as Administrator:
dd --list
Check which device is your SD card. In my case it was: \\?\Device\Harddisk1\Partition0
. Partition0
refers to the whole disk, Partition1
to the first partition, etc.
Copy whole SD card to an image file:
dd if=\\?\Device\Harddisk1\Partition0 of=my.img bs=1M --progress
Then insert the new card and write back image file to it:
dd if=my.img of=\\?\Device\Harddisk1\Partition0 bs=1M --progress
If you get an access denied error after writing couple of blocks, clean the partition table of the SD card before writing to it:
diskpart
DISKPART> list volume
DISKPART> select volume #
DISKPART> clean
DISKPART> exit
Related videos on Youtube
Alex F
Updated on September 18, 2022Comments
-
Alex F almost 2 years
I need to clone micro SD card, using Windows or Linux OS. SD card should be cloned as a whole volume, and not as partition. It may contains several partitions, some of them cannot be recognized by Windows/Linux. Basically, I want to make SD card image file, and then to insert another SD card media and copy this file to it, overriding everything that this media contains. How can I do this?
-
Alex F over 11 yearsThanks. This is exactly what I am trying to do, but from some reason the second stage (image file to SD card) hangs after some time.
-
Alex F over 11 yearsThanks. Can this program clone the whole media, and not only partition? Is this program free?
-
laurent over 11 yearsAre the SDs the same size? if not, the 2nd needs to be larger than 1st one. If not and SD1 not 100% used, you can try resizing the filesystems and partitions there but that is another topic :)
-
Alex F over 11 yearsFinally I managed to do this with dd, but it is necessary to unmount all SD card partitions before running dd.
-
Sawtaytoes almost 7 yearsHow have you used it? What are the steps to copy write an image to an SD card?