17

I'm trying to convert my hard drive from MBR to GPT using gdisk. When I run sudo gdisk /deve/disk1s4 I get this:

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

Does this mean that it's unsafe to change my HDD to GPT?

MeSo2
  • 317
  • 1
  • 3
  • 11
DisplayName
  • 11,468
  • 20
  • 73
  • 115
  • 3
    Is `/dev/disk1s4` the entire disk drive or just one partition of it? – Mark Plotnick Jun 08 '15 at 17:26
  • @MarkPlotnick That's one partition, (I have solved this issue now). – DisplayName Jun 09 '15 at 21:29
  • 3
    @displayname Would you mind answering your own question if you've solved it? – Bosse Klykken Sep 10 '15 at 09:27
  • @BosseKlykken, I always do that, the problem is I didn't do anything differently, it just disappeared. – DisplayName Sep 10 '15 at 11:28
  • 1
    very odd to "just disappear". I'm facing the same problem now. I have an SSD of 480 Gb that is my sda. My 2Tb HDD is my sdb. I've changed sda's to GPT successfully through this method, but when I try to change sdb as well it throws me this exact warning. 33 blocks – Aleksandrus Jun 28 '16 at 23:34

1 Answers1

21

From what I just found out, it may be unsafe. I was getting this same error

*************************************************************** Found invalid GPT and valid MBR; converting MBR to GPT format in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if you don't want to convert your MBR partitions to GPT format!


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

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 screenshot

When I ran gdisk afterwards no warning was thrown.

Aleksandrus
  • 331
  • 2
  • 9
  • 1
    @DisplayName: This answer actually seems to correctly answer the question (for me, too). Can you mark this as solution, please, if it also answers your question? – Golar Ramblar Jun 10 '23 at 18:34