Description of problem: When simulating a corrupt primary GPT table (zeroing LBA 2), GRUB fails to use the backup GPT and drops to a rescue prompt. Version-Release number of selected component (if applicable): grub2-2.00-25.fc20.x86_64 How reproducible: Always for primary GPT table zeroing. Never for backup GPT table zeroing. Steps to Reproduce: 1. Start with a working kvm/qemu to qcow2 using GPT, with valid protective MBR and valid primary and backup GPTs. 2. "Corrupt" the primary GPT table by dd if=/dev/zero of=/dev/vda seek=2 count=1 3. Reboot Actual results: error: no such partition. Entering rescue mode ... Expected results: Clearly core.img is found and loaded, so it should be capable of evaluating the validity of the primary GPT and if invalid, then use the backup GPT. Additional info: If the alternate GPT table is zero'd in this manner, the system still boots. So it may be grub only uses the primary GPT, and this makes me wonder if it does a validity check of the primary GPT, or if it just blindly uses whatever's in the primary table; in which case actual corruption rather than zeroing may produce different results. Also untested is zeroing/damaging either primary or backup GPT header instead of the table data.
Tested altering only the partitiontypeguid for the primary header. GRUB now boots even though gdisk and parted and the kernel consider it corrupt. So GRUB probably isn't checking for primary GPT validity, and if sufficiently corrupt or missing, won't use the backup GPT.
I think this is the desired logical sequence: Check if the MBR is a PMBR (1st and only entry is type 0xEE) and if not then consider the disk MBR and ignore any GPT info as stale. If it is PMBR, check validity of the primary GPT header+table, if valid use it. If invalid, check validity of backup GPT header+table, if valid use it. If invalid, fail.
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.