Copy a GPT partition table to another disk

The easiest way I found to duplicate a GPT partition table, is documented on Ask Ubuntu.

You need to install gdisk, then use the command line utility sgdisk:

# sgdisk --replicate=/dev/DISK_DESTINATION /dev/DISK_SOURCE
# sgdisk -G /dev/DISK_DESTINATION

DISK_SOURCE is the disk with the partition table you want to copy, DISK_DESTINATION is the disk that must receive the partition table.

Advertisements

2 thoughts on “Copy a GPT partition table to another disk

  1. Hi,

    Any way to make that work more like sfdisk, with the ability to dump to a file and then load from a file ? I’m trying to do exactly that but across server, the destination disk is remote.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s