Bootloader stage1_drive is more than a suggestion. (#738964)
Don't implicitly set it, and make sure it is honored when finding
potential stage1 devices.
---
pyanaconda/bootloader.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 4ef8b32..55ee16e 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -207,7 +207,7 @@ class BootLoader(object):
# the device the bootloader will be installed on
self._stage1_device = None
- # the "boot drive", meaning the drive we prefer stage1 be on
+ # the "boot drive", meaning the drive stage1 _will_ go on
self.stage1_drive = None
self._update_only = False
@@ -232,8 +232,12 @@ class BootLoader(object):
log.debug("using stage2 device as stage1")
self.stage1_device = self.stage2_device
else:
+ devices = self.stage1_devices
+ if self.stage1_drive:
+ devices = [d for d in devices if
+ self.stage1_drive in d.disks]
try:
- self.stage1_device = self.stage1_devices[0]
+ self.stage1_device = devices[0]
except IndexError:
pass