How do I copy the partition layout to a new drive?

It's useful in RAID setups to copy the partition tables over to a second/third/etc drive to save using fdisk to set them all up. To copy the partition table layout from /dev/sda to /dev/sdb you would use the following command.

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

Ensure you are using the correct source (/dev/sda above) and destination (/dev/sdb above) devices before issuing the command.

Tags: copy, fdisk, partition, partition table, sfdisk, table
Last update:
2014-12-16 22:06
Chris Burton
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category