I recently installed F16, later i noticed that one of the gpt header get corrupted
and i am tring to find why.
# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.1
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
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.
************************************************** **************************
Disk /dev/sda: 625142448 sectors, 298.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4F85375A-FCC5-4582-B687-916C9DE4D12B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 625142414
Partitions will be aligned on 2048-sector boundaries
Total free space is 2669 sectors (1.3 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02
2 4096 2101247 1024.0 MiB EF00 ext4
3 2101248 75501567 35.0 GiB 0700
4 75501568 390381567 150.1 GiB 0700
5 390381568 474267647 40.0 GiB 0700
6 474267648 482656255 4.0 GiB 8200
7 482656256 625141759 67.9 GiB 0700
# parted -l
Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? ok
Model: ATA SAMSUNG HM320HJ (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 1076MB 1074MB ext4 ext4 boot
3 1076MB 38.7GB 37.6GB ext4
4 38.7GB 200GB 161GB ext4
5 200GB 243GB 42.9GB
6 243GB 247GB 4295MB linux-swap(v1)
7 247GB 320GB 73.0GB ext4
Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/luks-0de9acb9-cb50-4a89-b93e-f9bc74b5724f: 42.9GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 42.9GB 42.9GB ext4
Something happens at boot, that either the main or backup gpt header "corrupts". One time the main, the other
the backup. I created the gpt partitions with anaconda at install time, with custom partitioning.
To repair it, i do:
# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.1
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
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): 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): p
Disk /dev/sda: 625142448 sectors, 298.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4F85375A-FCC5-4582-B687-916C9DE4D12B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 625142414
Partitions will be aligned on 2048-sector boundaries
Total free space is 2669 sectors (1.3 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02
2 4096 2101247 1024.0 MiB EF00 ext4
3 2101248 75501567 35.0 GiB 0700
4 75501568 390381567 150.1 GiB 0700
5 390381568 474267647 40.0 GiB 0700
6 474267648 482656255 4.0 GiB 8200
7 482656256 625141759 67.9 GiB 0700
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).
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
# partprobe
# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 625142448 sectors, 298.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4F85375A-FCC5-4582-B687-916C9DE4D12B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 625142414
Partitions will be aligned on 2048-sector boundaries
Total free space is 2669 sectors (1.3 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 4095 1024.0 KiB EF02
2 4096 2101247 1024.0 MiB EF00 ext4
3 2101248 75501567 35.0 GiB 0700
4 75501568 390381567 150.1 GiB 0700
5 390381568 474267647 40.0 GiB 0700
6 474267648 482656255 4.0 GiB 8200
7 482656256 625141759 67.9 GiB 0700
# parted -l
Model: ATA SAMSUNG HM320HJ (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 1076MB 1074MB ext4 ext4 boot
3 1076MB 38.7GB 37.6GB ext4
4 38.7GB 200GB 161GB ext4
5 200GB 243GB 42.9GB
6 243GB 247GB 4295MB linux-swap(v1)
7 247GB 320GB 73.0GB ext4
Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/luks-0de9acb9-cb50-4a89-b93e-f9bc74b5724f: 42.9GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 42.9GB 42.9GB ext4
I belive that sometimes it gets corrupted. Sometimes, but not allways,
when i power-on the laptop, systemd ask for root password or to press ctrl+d
for root login, with no visible cause of the question (no error), i just
press ctrl+d and it boots ok. Also grub2 adds like 10-15 seconds to the 'start'
boot process (which is more than the 5 seconds, since it is the first
time i do use it, i will not change it for now.)