Penguin
Note: You are viewing an old revision of this page. View the current version.

Clone a Harddrive

Lets say that /dev/sda is the hdd we wish to clone, and that /dev/sdb is an empty drive that is to be used as the target.

  • dd if=/dev/sda of=/dev/sdb bs=1M

Note : the destination harddrive should be equal or larger in size to the source harddrive.


Clone a CD/DVD

  • dd if=/dev/cdrom of=/here/is/a/path/mycdrom.iso

How to backup and restore your MBR

Including the partition table.

Backup : dd if=/dev/sda of=/backup/mbr.bkp bs=512 count=1
Restore : dd if=/backup/mbr.bkp of=/dev/sda bs=512 count=1

Excluding the partition table (only the executable code area)

Backup : dd if=/dev/sda of=/backup/mbr.bkp bs=446 count=1
Restore : dd if=/backup/mbr.bkp of=/dev/sda bs=446 count=1