Manage partition tables with sfdisk
List the partitions of a device (sda):
sfdisk -l /dev/sda
Test and show consistent check status on device (sda):
sfdisk -V /dev/sda
Two ways to create new partitions from an old device (sda):
(a) Copy the entire partition table from one disk (sda) to another (sdb)
sfdisk -d /dev/sda | sfdisk /dev/sdb
(b) Dump the partitions of a device (sda) in a format useful as input to sfdisk:
i). Dump the partitions info first
sfdisk -d /dev/sda > partition.table.dump
ii). Write partition table from file to device (sdb):
sfdisk /dev/sdb < partition.table.dump
References
man page for sfdisk