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.

You cannot comment on this entry