When I boot to a new UEFI/GPT install of Ubuntu-MATE 20.04 on an external SSD, I get a warning when I open either gdisk or Gparted.
gdisk says "Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header." (The Gparted warning is similar, backup table is corrupt, using main one, etc.)
When, in gdisk, I hit the "p" (for print) command, I get this further warning: "Warning! One or more CRCs don't match. You should repair the disk!"
and: "Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recover are STRONGLY recommended."
Continuing in gdisk, I hit "v" and then write to disk as per the answer provided here, then everything is fine, no more warnings.
But when I re-boot, it starts all over again with the same warnings.
My bootloader is grub2, I'm not dual-booting, I don't use Windows, and I don't have Secure Boot. I do have an internal drive (my current working system, Ubuntu-MATE 18.04) that is not UEFI/GPT and boots via BIOS. (For what it's worth, both 18.04 and 20.04 are using the same Linux kernel, 5.4.0-48-generic.)
(And I do have back-ups (created with rsync) of both the ESP and root partitions of the external drive. The backups are on a separate, storage-only SSD.)
(I also have the rEFInd boot manager installed on the external drive; I only see it when I press F10 while booting. I installed rEFInd because I plan to use it later when I dual boot 20.04 with a new UEFI/GPT 18.04. Both will eventually be placed as internal drives.)
I found one answer that was related (he also was able to fix the same warning problem, yet the warning would repeat after reboot). He said "Eventually I tracked it down to the firmware overwriting the CRC entries in the backup GPT header every boot to some invalid value."
I have a feeling something similar may be going on with my situation.
His solution was to "Change the disk mode in the firmware setup from RAID to AHCI."
In my case, I don't know that this would help: My BIOS firmware menu (in "Advanced -> Drive configuration -> Configure SATA as ...") is already set (and has always been set) to "AHCI." The other two choices are "RAID" and "IDE." At the moment I'm not inclined to change from ACHI to either RAID or IDE.
Here is the output of sudo parted -l
(I'm running this command while logged into my BIOS-booted internal 18.04 (/dev/sda). The top drive listed is sda (the BIOS 18.04), the 2nd drive is my storage SSD, & the third (/dev/sdc) is the external drive in question):
--> sudo parted -l
Model: ATA WDC WDS100T2B0A (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 33.6MB 998GB 998GB primary ext4 boot
Model: ATA SanDisk Ultra II (scsi)
Disk /dev/sdb: 960GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 960GB 960GB primary ext4
Model: SanDisk Ultra II 960GB (scsi)
Disk /dev/sdc: 960GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 8389kB 585MB 577MB fat32 EFI System (ESP) boot, esp
2 587MB 960GB 960GB ext4 UbuntuMATE-20.04
And sudo gdisk -l /dev/sdc:
--> sudo gdisk -l /dev/sdc pts/2 Saturday 2020-10-10 18:50:23
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdc: 1875385008 sectors, 894.3 GiB
Model: Ultra II 960GB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): F4DEFA58-650D-4D70-98CF-06C88C5FCBBF
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1875384974
Partitions will be aligned on 2048-sector boundaries
Total free space is 88132 sectors (43.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 16384 1143336 550.3 MiB EF00 EFI System (ESP)
2 1146880 1875316735 893.7 GiB 8300 UbuntuMATE-20.04
(If, however, I boot into sdc and run sudo gdisk -l /dev/sdc
, gdisk will say "GPT corrupted and will give the "one or more CRCs don't match" error message.)
I will now try to update the external drive's firmware. I haven't done that.
Does anyone suspect what might be the cause of the warning and how it might be remedied?
ext4
file system, you can do it withe2fsck
according to this link.gpt-fix
according to this link.