1

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?

  • Maybe it will help to repair the file system. If you have an ext4 file system, you can do it with e2fsck according to this link. – sudodus Oct 10 '20 at 21:37
  • And, of course, please check the S.M.A.R.T. information to see if the drive is healthy (See the same link as in my first comment.) – sudodus Oct 10 '20 at 21:44
  • Sorry for the bad order of my tips, but here is a tip focusing on reparing the backup partition table: You can try the shellscript gpt-fix according to this link. – sudodus Oct 10 '20 at 21:50
  • Is there a separate power supply for the external SSD? Or is it only supplied via the USB connection? In the latter case it is possible that it is not shut down correctly (the power might be cut off before everything is put into the right place). - But I suspect that there is something wrong with the SSD itself or the USB adapter for it, so the S.M.A.R.T. information is important. – sudodus Oct 10 '20 at 22:03
  • Thanks for the tips & links, looking at them now. The external SSD has no separate power supply; it's in a compact enclosure (that I rather like) just a bit larger than the drive itself. But you many be onto something here because when I shut down, it doesn't, entirely, & I have to hold the power button on the desktop workstation in for 6 seconds, & shut down that way. So I do perhaps need to address how to shut down properly before anything else. – Melvin Q. Watchpocket Oct 10 '20 at 22:15
  • Why or how did you get hybrid MBR? That was typically used on Mac which was UEFI/gpt back when you could only boot Windows in BIOS/MBR mode. Post both of these: sudo parted -l and sudo gdisk -l /dev/sdX where sdX is your external drive like sdf? Have you updated SSD to latest firmware available? – oldfred Oct 10 '20 at 22:46
  • I'll add the output of those in my post above. – Melvin Q. Watchpocket Oct 10 '20 at 22:52
  • How does one find out what an SSD's current firmware is? SanDisk dashboard is only available in Windows. – Melvin Q. Watchpocket Oct 10 '20 at 23:40
  • Rod Smith commented here, he is creator of gdisk, so knows gpt better than just about anyone. https://askubuntu.com/questions/633465/the-crc-for-the-main-partition-and-back-up-partition-table-are-invalid – oldfred Oct 11 '20 at 02:59
  • "So I do perhaps need to address how to shut down properly before anything else." -- Yes, and check the S.M.A.R.T. information and check the file system and repair it if necessary. Furthermore oldfred's questions and tips are important. – sudodus Oct 11 '20 at 09:47
  • See https://ubuntuforums.org/showthread.php?t=2451767 – Melvin Q. Watchpocket Oct 12 '20 at 03:33

0 Answers0