Sunday, 3 February 2008

Backup Partition Table

Where /dev/sda is the disk partition table to be backed up:

Backup

dd if=/dev/sda of=sda.mbr bs=512 count=1

To keep a human readable copy, useful when recovering from problems:

sudo fdisk -l > partitions.lst

Restore

dd if=sda.mbr of=/dev/sda bs=512 count=1

Essential before any partition editing or recovery operations which might damage the partition.

0 comments:

iantheteacher

Planet ILUG