Difference between revisions of "Linux command: dd"

From RHS Wiki
Jump to navigation Jump to search
(Created page with "== dd == It's used to manage images (create / dump)<br /> To dump an image to a device (WARNING, IF YOU ENTER THE WRONG DEVICE IT WILL BE OVERRITEN) dd bs=4M if="/home/linux/...")
 
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
(*) Note: The cdrom must not be mounted.<br />
 
(*) Note: The cdrom must not be mounted.<br />
 
You can check the image with md5sum.
 
You can check the image with md5sum.
 +
<br />
 +
To see progres:
 +
dd status=progress if=/dev/cdrom of=/tmp/cdimg1.iso
 +
 +
== Create compressed image ==
 +
sudo dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c  > /PATH/TO/DRIVE/backup_image.img.gz
 +
== Restore compressed image ==
 +
gunzip -c /PATH/TO/DRIVE/backup_image.img.gz | dd of=/dev/sda

Latest revision as of 12:16, 27 February 2019

dd[edit]

It's used to manage images (create / dump)
To dump an image to a device (WARNING, IF YOU ENTER THE WRONG DEVICE IT WILL BE OVERRITEN)

dd bs=4M if="/home/linux/2013-02-09-wheezy-raspbian.img" of=/dev/mmcblk0

To create an image from a CD:

dd if=/dev/cdrom of=/tmp/cdimg1.iso

(*) Note: The cdrom must not be mounted.
You can check the image with md5sum.
To see progres:

dd status=progress if=/dev/cdrom of=/tmp/cdimg1.iso

Create compressed image[edit]

sudo dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c  > /PATH/TO/DRIVE/backup_image.img.gz

Restore compressed image[edit]

gunzip -c /PATH/TO/DRIVE/backup_image.img.gz | dd of=/dev/sda