Create a disk image of an sdcard

From gr0x0rd
Jump to navigation Jump to search

First, insert the sdcard and confirm it's recognized by your system. Determine the kernel device assignment (sdX in this example). To create a compressed disk image from an sdcard, use the dd utility.

$ sudo dd if=/dev/sdX | gzip -c > /path/to/sdcard.img.gz

To extract the compressed disk image onto an sdcard using the reverse process

$ gunzip -c /path/to/sdcard.img.gz | sudo dd of=/dev/sdX