[blivet/rhel7 2/4] Make sure bootloader is setup after autopart (#1015277)

Brian C. Lane bcl at redhat.com
Thu Oct 3 23:38:17 UTC 2013


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

Autopart, or user changes may change what disks are suitable for a
bootloader (eg. changing a raw formatted disk to a partitioned disk).
Make sure that bootDisk is setup after all the other changes have been
done.

Related: rhbz#1015277
---
 blivet/__init__.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index 083ce78..3b4176b 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -417,9 +417,7 @@ class Blivet(object):
         if self.bootloader:
             # clear out bootloader attributes that refer to devices that are
             # no longer in the tree
-            self.bootloader.stage1_disk = None
-            self.bootloader.stage1_device = None
-            self.bootloader.stage2_device = None
+            self.bootloader.reset()
 
         self.roots = []
         if flags.installer_mode:
@@ -1714,6 +1712,8 @@ class Blivet(object):
             log.info("user specified that bootloader install be skipped")
             return
 
+        # Need to make sure bootDrive has been setup from the latest information
+        self.ksdata.bootloader.execute(self, self.ksdata, None)
         self.bootloader.stage1_disk = self.devicetree.resolveDevice(self.ksdata.bootloader.bootDrive)
         self.bootloader.stage2_device = self.bootDevice
         self.bootloader.set_stage1_device(self.devices)
-- 
1.8.3.1



More information about the anaconda-patches mailing list