"Warning! Secondary partition overlaps the last partition by x blocks" in gdisk, is it safe to use gdisk here?
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:
When I ran gdisk
afterwards no warning was thrown.
Related videos on Youtube
DisplayName
Updated on September 18, 2022Comments
-
DisplayName over 1 year
I'm trying to convert my hard drive from MBR to GPT using
gdisk
. When I runsudo 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?