[PATCH] Add additional checks for HFS+ ESP (#1010495)

Brian C. Lane bcl at redhat.com
Fri Sep 27 22:24:25 UTC 2013


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

This checks to make sure any partition we use meets the normal
requirements for stage1 and is < 501.0MB and is not labeled "OSX"
---
 pyanaconda/bootloader.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 55a93a2..07b8703 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1703,6 +1703,14 @@ class MacEFIGRUB(EFIGRUB):
         super(MacEFIGRUB, self).install()
         self.mactel_config()
 
+    def is_valid_stage1_device(self, device, early=False):
+        valid = super(MacEFIGRUB, self).is_valid_stage1_device(device, early)
+
+        # Make sure we don't pick the OSX root partition
+        if valid and device.size < 501.0 and device.format.label != "OSX":
+            return True
+
+        return False
 
 class YabootBase(BootLoader):
     def write_config_password(self, config):
-- 
1.8.3.1



More information about the anaconda-patches mailing list