Ubuntu – GPT PMBR size mismatch after dd clone

ddgpthard drivemigration

I am migrating my Ubuntu EFI boot system to a larger hdd. I used the command

dd if=/dev/sdb of=/dev/sda

I did not dismount the input file before copying and the output file was fresh unpartitioned space. I have successfully booted from the new larger hdd.

  • fdisk -l reports:

    GPT PMBR size mismatch

  • gdisk reports the old drive size (200GB) and

  • PMBR is reporting the new hard drive size (2TB).

The error states gdisk w (write) command will work, however gdisk help recommends command xe (relocate backup to end of disk).

My goal is to remove the old drive and use the new drive as a primary boot disk with my old grub install intact.

Shall I just go ahead an expand the partitions or should I use one of these commands?

Best Answer

Do as the gdisk prompt suggests: Use the e option on the experts' (x) menu to relocate the data structures to the end of the disk. You can accomplish the same thing in parted or GParted if you prefer. IIRC, they do it semi-automatically, although they ask for confirmation.

Once you've moved the GPT backup data structures, you can resize your partition(s) using GParted.

Related Question