Description of problem: When the primary GPT is corrupt and the backup GPT is valid, fdisk incorrectly considers the disklabel to be dos (MBR). When either primary or backup GPT is corrupt, fdisk incorrectly doesn't inform the user, and doesn't enable restoration of the invalid GPT with information from the valid one. Marking this bug as urgent because the entire point of having two GPTs is precisely to avoid the problem described in this bug. Version-Release number of selected component (if applicable): util-linux-2.24-0.1.fc20.x86_64 How reproducible: Always. Steps to Reproduce: 1. Use parted or gdisk to create a GPT partitioned disk. 2. Use dd to modify LBA 2. 3. Try to edit the disk with fdisk. Actual results: fdisk reports the disk label type is dos. Expected results: fdisk is required by the UEFI spec to use the valid GPT and restore the invalid GPT (using the correct information in the valid GPT). Additional info: Further, if LBA -33 is modified instead in step 2 above; fdisk correctly considers the disk gpt, but incorrectly fails to inform the user that the backup GPT is corrupt and offers no obvious means of restoring it. Try to edit the disk with either parted or gdisk. They will notify which GPT is corrupt, and that the other is being used instead, and upon write will restore the invalid GPT.
Fixed by upstream commit d2d9efa103a744363bd000e075435341c5256c8a. Fedora package will be updated ASAP.
.. and commit upstream commit 45ddb828ed7eef92db34841c9d583047b6a6c65e.
util-linux-2.24-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/util-linux-2.24-1.fc20
Package util-linux-2.24-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing util-linux-2.24-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-19766/util-linux-2.24-1.fc20 then log in and leave karma (feedback).
Separately zero'd LBA 2 and LBA -33. fdisk, like gdisk and parted, complains about corruption of the proper GPT, and upon writing out existing the problem is fixed. Repeated the test with a one byte change to the partitiontypeGUID of the first partition. Same results, fdisk catches the corruption in the proper GPT and fixes either one. Bug appears to be fixed.
util-linux-2.24-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.