1
Question: gparted keeps claiming "The backup GPT table is corrupt, but the primary appears OK, so that will be used.". It persists even when I wipe the GPT table using gdisk, try to create new gpt table, try to create new mbr table.
Background: Recently, I got a new SSD drive. I used clonezilla to copy my old Ubuntu installation from a smaller SSD over to it, and it worked fine. Then I installed Windows on the side. There were some problems, but each system booted correctly more or less half of the time, but at some point, I could no longer boot Ubuntu at all.
I booted into a live usb, and in there, gparted and parted both gave me a message:
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes
I thought maybe clonezilla did something wrong in the new ssd, so I turned off the computer, unplugged the new SSD and left an old HDD plugged in. To my surprise, I got the same message from gparted after rebooting, so I decided to use the HDD as a test ground for solutions. There were some similar posts here and elsewhere -- only they were for usb sticks -- and according to the answers given there, I backed up all the data from the HDD to an external drive (this time without any low-level tools, just nautilus), and erased the whole disk via dd if=/dev/zero of=/dev/sda bs=100M
.
When it finished, I no longer got the message. However, parted threw at me
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
I tried to create new partition table (gpt and msdos both), create new partitions, tried zapping everything with sgdisk -Z /dev/sda
, overwriting the gpt via gdisk
, tried installing windows and linux on top of the zapped gpt, and the problem persists. Installed Linux boots up fine. I did not try to boot Windows (I did not go past partitioning phase, I just wanted it to create new partition table with its own tools). Except for the gparted alert, there does not seem to be anything overtly wrong, but I'm worried that if I just ignore it, it will not only be annoying, but also lead to some more problems downhill.
I feel entirely helpless at this point. I have no idea what the problem might be. Unfortunately, I don't have any other device at hand to check the disks (though if all else fails, I suppose I'll try that).
I'm not sure how
dd
handles it if you have a full drive. You told it to use a block size of 100 MB for reading and writing. Maybe it skipped overwriting the last 100 MB of the disk? As the backup for a GPT table would be stored at the end of the disk it might be seeing a, possibly, damaged table. As for the message about 512 Byte/2KB sectors check your drive description. It doesn't sound like you have a problem anymore right now? – Seth – 2016-12-05T12:20:15.433@Seth: I see. That might make sense. But why doesn't creating and zapping gpt fix it? If that's true, do you have any idea how to delete what remains without dd ing the whole disk with physical blocksize? I think it would take over 10 hours... As for the blocksize issue, it is not present on the HDD, but it is still (I believe) there for the ssd. If you have any idea on how to fix it without nuking the disk, I would be interested in that. – tomasz – 2016-12-05T13:57:40.807
Although obviously, zeroing the ssd would be much faster. But I don't want to do it unless I'm sure that will actually resolve all the issues. – tomasz – 2016-12-05T13:58:52.677
By the way, the solution at http://askubuntu.com/q/386752/226024 does not solve the problem. :(
– tomasz – 2016-12-05T14:01:35.780It was just my guess. I might be wrong on this. After all, as your askubuntu link points out, the table should be "repaired" by writing it again. How much smaller was the old SSD? For you blocksize issue at least this question doesn't make it look like there is a solution short of nuking it.
– Seth – 2016-12-05T15:15:00.150@Seth the smaller one is 128 GB, the bigger one is twice the size. – tomasz – 2016-12-05T15:28:22.160
@Seth: I think you are right about the secondary gpt, if you believe Wikipedia, see: https://en.wikipedia.org/wiki/GUID_Partition_Table#/media/File:GUID_Partition_Table_Scheme.svg.
– tomasz – 2016-12-05T16:01:04.103@Seth: Actually, the answer was far less serious. The complaint about corrupt GPT was not about the HDD, but the pendrive I had booted from... sorry for wasting your time and thanks a lot for the help! – tomasz – 2016-12-05T16:34:04.033