Partition tables, managing with sfdisk

From Ubuntuwiki.net

Jump to: navigation, search

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 later:

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

Write a device's partition table from a file created as above:

sfdisk /dev/sdb < partition.table.dump
Personal tools