[PATCH 2/4] clear pmbr_boot on EFI systems (#844551)

Brian C. Lane bcl at redhat.com
Thu Oct 25 20:04:36 UTC 2012


From: "Brian C. Lane" <bcl at redhat.com>

pmbr_boot should be off for EFI systems. Leaving it on cause cause
problems with some systems.
---
 pyanaconda/storage/formats/disklabel.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/storage/formats/disklabel.py b/pyanaconda/storage/formats/disklabel.py
index 87dbea2..7a8c18b 100644
--- a/pyanaconda/storage/formats/disklabel.py
+++ b/pyanaconda/storage/formats/disklabel.py
@@ -171,14 +171,15 @@ class DiskLabel(DeviceFormat):
 
             # Set the boot flag on the GPT PMBR, this helps some BIOS systems boot
             if self._partedDisk.isFlagAvailable(parted.DISK_GPT_PMBR_BOOT):
-                # MAC canboot as EFI or as BIOS, neither should have PMBR boot set
+                # MAC can boot as EFI or as BIOS, neither should have PMBR boot set
                 if iutil.isEfi() or iutil.isMactel():
-                    log.debug("Not setting pmbr_boot on %s" % (self._partedDisk,))
+                    self._partedDisk.unsetFlag(parted.DISK_GPT_PMBR_BOOT)
+                    log.debug("Clear pmbr_boot on %s" % (self._partedDisk,))
                 else:
                     self._partedDisk.setFlag(parted.DISK_GPT_PMBR_BOOT)
                     log.debug("Set pmbr_boot on %s" % (self._partedDisk,))
             else:
-                log.debug("Did not set pmbr_boot on %s" % (self._partedDisk,))
+                log.debug("Did not change pmbr_boot on %s" % (self._partedDisk,))
 
         return self._partedDisk
 
-- 
1.7.11.7



More information about the anaconda-patches mailing list