From 0880c84628ae673f467ed46acca0bbf6e82bbdfe Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 20 Oct 2011 17:16:53 -0700 Subject: [PATCH] only allow GPT boot flag on EFI System partition (#746895) When parted sets the boot flag on a GPT labeled disk's partition it sets the EFI System GUID type. This results in BIOS systems' boot partition having the wrong GUID type, and EFI systems having multiple EFI System partitions. --- pyanaconda/storage/__init__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py index 5317c1b30ca..b94ce65d9e3 100644 --- a/pyanaconda/storage/__init__.py +++ b/pyanaconda/storage/__init__.py @@ -398,9 +398,16 @@ def doIt(self): p.getFlag(parted.PARTITION_BOOT): skip = True break + + # GPT labeled disks should only have bootable set on the + # EFI system partition (parted sets the EFI System GUID on + # GPT partitions with the boot flag) + if dev.disk.format.labelType == "gpt" and \ + dev.format.type != "efi": + skip = True + if skip: - log.info("not setting boot flag on %s as there is" - "another active partition" % dev.name) + log.info("not setting boot flag on %s" % dev.name) continue # hfs+ partitions on gpt can't be marked bootable via # parted