Quick Command – backup/restore partition table

Method 1

Backup:
sfdisk -d /dev/sda > sda_table
Restore:
sfdisk /dev/sda < sda_table

Method 2

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

Saving a human readable partition table

fdisk -l > partitions.lst

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: