Re: The backup GPT table is corrupt
On 2025-08-12 05:50, David Christensen wrote:
On 8/11/25 17:35, mick.crane wrote:
I thought I might upgrade to Trixie.
This bookworm install I think I let the installer decide what to do.
I don't really understand EFI and GPT, I might have done but I've
forgotten.
Take a look at your BIOS/EUFI Setup settings --"Mode", "BIOS", "UEFI",
"Legacy", etc..
I was concerned that the backup GPT table being corrupt might cause
issues upgrading to Trixie.
Fixing the secondary GPT sounds like a good idea, regardless.
<snipped useful information in order that post is not excessively long>
The BIOS is like 12 years old.
The boot list option has UEFI checked
The boot sequence has
debian
bookworm
UEFI Hard Drive
all checked.
the boot order is
1 Debian
2 Bookworm
3 UEFI Hard Drive
I don't know why there's so many entries. I may have changed the disk
from MBR to GPT.
Likely after it was working I stopped messing with it.
-------
root@courgette:/home/mick# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.9
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: OK
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but
disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Command (? for help): v
No problems found. 2925 free sectors (1.4 MiB) available in 2
segments, the largest of which is 2014 (1007.0 KiB) in size.
Command (? for help): Command (? for help): r
Recovery/transformation command (? for help): ?
b use backup GPT header (rebuilding main)
c load backup partition table from disk (rebuilding main)
d use main GPT header (rebuilding backup)
e load main partition table from disk (rebuilding backup)
f load MBR and build fresh GPT from it
g convert GPT into MBR and exit
h make hybrid MBR
i show detailed information on a partition
l load partition data from a backup file
m return to main menu
o print protective MBR data
p print the partition table
q quit without saving changes
t transform BSD disklabel partition
v verify disk
w write table to disk and exit
x extra functionality (experts only)
? print this menu
Recovery/transformation command (? for help): d
Recovery/transformation command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE
EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
root@courgette:/home/mick# reboot
root@courgette:/home/mick# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.9
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: OK
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but
disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Command (? for help):
Repair seems to have failed.
Maybe it's to do with the entries in the boot order but now I'm nervous
to change it.
mick
Reply to: