Create a disk image of an sdcard

From gr0x0rd
Revision as of 16:01, 24 April 2022 by Gr0x0rd (talk | contribs) (Created page with "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 sd...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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