[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Set boot flag for /boot on mdraid 1 array too (#533533).



---
 storage/__init__.py |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 70c3227..4e911ed 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -281,13 +281,20 @@ class Storage(object):
         # now set the boot partition's flag
         try:
             boot = self.anaconda.platform.bootDevice()
+            if boot.type == "mdarray":
+                bootDevs = [self.devicetree.getDeviceByName(x) for x in
+                            self.anaconda.id.bootloader.getPhysicalDevices(boot.name)]
+            else:
+                bootDevs = [boot]
         except DeviceError:
-            boot = None
+            bootDevs = []
         else:
-            if hasattr(boot, "bootable"):
-                boot.bootable = True
-                boot.disk.setup()
-                boot.disk.format.commitToDisk()
+            for dev in bootDevs:
+                if hasattr(dev, "bootable"):
+                    log.info("setting boot flag on %s" % dev.name)
+                    dev.bootable = True
+                    dev.disk.setup()
+                    dev.disk.format.commitToDisk()
 
     @property
     def nextID(self):
-- 
1.6.0.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]