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

[PATCH 6/9] Set boot partition's boot flag, stage2 has priority, fallback to stage1



By dlehman redhat com

Related: rhbz#727933
---
 pyanaconda/storage/__init__.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 8e2cb6a..2498295 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -384,16 +384,17 @@ class Storage(object):
         self.doEncryptionPassphraseRetrofits()
 
         # now set the boot partition's flag
-        try:
-            boot = self.bootDevice
+        if self.anaconda:
+            if self.anaconda.bootloader.stage2_bootable:
+                boot = self.bootDevice
+            else:
+                boot = self.bootLoaderDevice
+
             if boot.type == "mdarray":
                 bootDevs = boot.parents
             else:
                 bootDevs = [boot]
-        except (DeviceError, AttributeError):
-            # AttributeError means we have no platform instance. it's ok.
-            bootDevs = []
-        else:
+
             for dev in bootDevs:
                 if hasattr(dev, "bootable"):
                     # Dos labels can only have one partition marked as active
-- 
1.7.4.4


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