Clone partition table

From Wiki
Jump to: navigation, search

sfdisk can be used to dump and restore partition tables.

Save partition table to a text file:

sfdisk -d /dev/sda > partitions.txt

Create partitions based on text file:

sfdisk /dev/sdb < partitions.txt