2

I’m going to change MBR to GPT using gdisk but when I type:

sudo gdisk /dev/sda

I have a warning tell me:

Warning! Secondary partition table overlaps the last partition by 33 blocks! You will need to delete this partition or resize it in another utility.

this is a gparted screen of partition I have:

3
  • What was previously in the unallocated space? Best not to change MBR to GPT, better to backup your important files, wipe the disk to GPT, and rebuild from scratch, and restore your files.
    – heynnema
    Aug 6, 2017 at 18:36
  • 1
    The warning tells you what's wrong: Your final partition (/dev/sda5 in your case) intrudes into the space GPT must use for its backup partition table. In order to convert to GPT, that partition must be deleted or shrunk (from the end).
    – Rod Smith
    Aug 9, 2017 at 17:49
  • Could you please edit your question to include the output of sudo fdisk -l /dev/sda? Thanks. Sep 13, 2017 at 11:17

1 Answer 1

1

The answer is given here at unix.stackexchange.com:

According to THIS link, zman0900 says:

GPT writes its partition table to both ends of the disk, unlike MBR which only uses the beginning. So you will need to shrink your last partition by at least 33 blocks (probably 16,896 bytes, assuming 512 byte blocks). If you have or can install gparted, that makes it very easy to do. If boot is the last partition on the drive, then that is the one to shrink.

I was getting this error because my last partition did not leave any space after it. All I had to do was shrink the partition from the rightmost side a little bit (3Mb but could be less), and the result was the following:

"GParted after shrinking the last partition

When I ran gdisk afterwards no warning was thrown.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .