What is GPT Partition ?

GPT (GUID Partition Table) is a standard for the layout of the partition table on a physical hard disk, using globally unique identifiers (GUID). GPT is a part of the EFI standard that defines the layout of the partition table. GPT is useful for creating filesystem on disk larger than 2TB. For smaller size of disks generally we use MBR but it does not support disk over 2TB.

Advertisement

sgdisk is a command-line GUID partition table (GPT) manipulator for Unix like systems.

In this article we are using sgdisk command to Clone/Copy a GPT Partition Table to Another Disk. You may got confuse with sgdisk parameters sequences, so be careful while using this command.

Command Syntax

To clone GPT partition table command syntax are as following.

# sgdisk -R <New_Disk> <Existing_Disk>

The command syntax is bit confusing in sequence New disk and existing disk, so take care on it. Basically New Disk comes first.

Clone Partition Table on New Disk

Lets make a clone of Partition table to a new disk. For example our Existing disk is /dev/sda and need to clone partition table to new disk /dev/sdb.

# sgdisk -R /dev/sdb /dev/sda

Also set a new GUID on new drive after cloning the partition table

# sgdisk -G /dev/sdb
Share.

2 Comments

  1. Dear Mr.Rahul, I have an issue in cloning my 2TB HDD, containing GPT (Windows) EFI, BIOS-boot partition and ext4 partitions, the system is dual boot, but when I clone and boot through the second (cloned) drive it give a grub prompt, does not show menu for selecting os i.e. windows or linux. on typing exit on(Grub>) prompt I am able to boot windows and is working fine, what may the issue, why grub loader is not getting cloned.
    Note: it says error cloning patition /sda7 to /sdb7, same way /sda9 to /sdb9. Please giveme a solution for this.

Exit mobile version