Skip to content

Commit

Permalink
only allow GPT boot flag on EFI System partition (#746895)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bcl committed Mar 6, 2012
1 parent df55a02 commit 0880c84
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pyanaconda/storage/__init__.py
Expand Up @@ -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
Expand Down

0 comments on commit 0880c84

Please sign in to comment.