Fixing corrupt backup GPT table?
Solution 1:
Best to backup partition table first, just in case changes are not correct. Then it is possible to restore old partition table. If drive is sda & save to another drive:
sudo sfdisk -d /dev/sda > PT_sda.txt
Use gdisk and verify partitions are correct with p
, and use w
to write the partition table. If not correct just use q
to quit. That should update primary, backup & protective MBR.
sudo gdisk /dev/sda
Command (? for help):
b
back up GPT data to a filec
change a partition's named
delete a partitioni
show detailed information on a partitionl
list known partition typesn
add a new partitiono
create a new empty GUID partition table (GPT)p
print the partition tableq
quit without saving changesr
recovery and transformation options (experts only)s
sort partitionst
change a partition's type codev
verify diskw
write table to disk and exitx
extra functionality (experts only)?
print this menu
Be sure to see comment below by Rod Smith, he is author of gdisk at his rodbooks site.
Solution 2:
The simplest way to fix backup GPT is:
sgdisk -e <target-device>
for example:
sgdisk -e /dev/sda
Solution 3:
Not exactly sure, but when I have two disks part of software raid (MDADM) I get this message. I damaged the array trying to remove this message. I was forced to recreate the array, and I still get this message. Since the array works, but I still get this message, I am just going to live with the message instead of trying to remove/fix it.