Saving the master boot record of hard-disk under Debian
Backup
The first line is to backup MBR, the second line is to backup extended partitions (important just as well!!)
$> dd if=/dev/sda of=/tmp/backup-sda.mbr bs=512 count=1
$> sfdisk -d /dev/sda > /tmp/backup-sda.sfdisk
Restore
$> dd if=backup-sda.mbr of=/dev/sda
$> sfdisk /dev/sda < backup-sda.sfdisk
Recent Comments