Disk Images

From Tomelec
Revision as of 16:16, 20 September 2011 by Tom (talk | contribs)

Jump to: navigation, search

Create and restore a compressed image of a disk

The whole disk (SD-card) is read, piped through gzip for compression and written to the ouput file image.gz.

dd if=/dev/mmcblk0 bs=1M | gzip --stdout > ./image.gz

Restore:

gunzip --stdout image.gz | dd of=/dev/mmcblk0 bs=1M

Note:

  • both commands require root privileges
  • be very very careful to choose the right device when restoring!