Cloning a 2 TB disk with dos label to a 4 TB one with gpt label

Hello everybody out there using Linux,

Cloning disk using dd usually works fine for me, but I ran into troubles when cloning a 2 TB disk to a 4 TB one: the dos label would need to be changed to a gpt one to support enlarging to the new size. Is it possible to change that after having cloned the disk with dd?


Yes, after cloning the disk, you can use gdisk to perform in-place conversion of the DOS/MBR label to a GPT one. (There is no specific menu command for that – the label will be automatically converted to GPT as soon as you use w to write it.)

(For scripts, the same thing can be done non-interactively using sgdisk --mbrtogpt.)


Alternatively, first create a GPT label on the new disk, create all partitions of the exact sizes needed (using fdisk, sfdisk, gdisk, or whatever tool you prefer), and clone the individual partitions using dd one by one.

This method has advantages – e.g. when cloning a partition with NTFS filesystem, you can instead use ntfsclone which skips empty areas making the process faster.

One possible way to clone the partition layout from a MBR disk to a GPT disk is:

sfdisk --dump /dev/OLD | sed "s/^label:.*/label: gpt/; /^label-id:/d" | sfdisk /dev/NEW

(Don't bother cloning the BIOS boot sector manually, as most likely you'll need to install a new GPT-aware boot sector anyway.)