4

I have a microSD card. It was created from an embedded Linux image and it is used to boot up a device. I like to make a copy in case the card gets damaged.

So should I use the dd command to copy the card to some file and save that file as backup? What is the dd command?

1 Answers1

7

Could you show me the dd command?

If you're using a USB adapter, the SD card will show up as a /dev/sdx device node. If so use

dd if=/dev/sdx of=sd_image.bin bs=32768

If your computer has an integrated card reader, then the SD card will probably show up as a /dev/mmcblk0 device node. If so use

dd if=/dev/mmcblk0 of=sd_image.bin bs=32768

These commands will copy the entire SD card (that is, its MBR sector, all partitions, and all unallocated sectors), and terminate when the device reports that the "end" has been reached. The resulting image file can only be copied back to an SD card of the same (or larger) capacity.

sawdust
  • 18,591