How to manage partition tables with sfdisk

Test whether partitions seem correct:

sfdisk -V /dev/sda

Copy the entire partition table from one disk to another:

sfdisk -d /dev/sda | sfdisk /dev/sdb

Dump the partitions of a device in a format useful as input to sfdisk:

sfdisk -d /dev/sda > partition.table.dump

Write a devices partition table from file:

sfdisk /dev/sdb < partition.table.dump

Discussion

Enter your comment:

Subscribe to the RSS feed for Andy's Debian HOWTOs

Article from Andy's Debian HOWTOs (http://www.besy.co.uk/debian/debian)

 
debian/how_to_backup_and_manage_partition_tables_with_sfdisk.txt · Last modified: 2008/08/01 22:56 (external edit) · [Old revisions]
Recent changes RSS feed Powered by Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki