https://bugzilla.redhat.com/show_bug.cgi?id=827116 The default on PowerPC machines is to change the boot order to boot into the newly installed drive. There are install scenarios where this is not preferable. So, I have added a new boot commandline and kickstart option called leavebootorder. --- anaconda | 1 + pyanaconda/bootloader.py | 8 +++++++- pyanaconda/flags.py | 3 ++- pyanaconda/kickstart.py | 5 ++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/anaconda b/anaconda index 939262d..ce6aded 100755 --- a/anaconda +++ b/anaconda @@ -267,6 +267,7 @@ def parseOptions(argv=None, cmdline=None): op.add_option("--image", action="append", dest="images", default=[]) op.add_option("--memcheck", action="store_true", default=True) op.add_option("--nomemcheck", action="store_false", dest="memcheck") + op.add_option("--leavebootorder", action="store_true", default=False) # some defaults change based on cmdline flags if cmdline is not None: diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index 2389a4a..e47b890 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1064,6 +1064,9 @@ class BootLoader(object): if self.drive_order: f.write(" --driveorder=%s" % ",".join(self.drive_order)) + if flags.leavebootorder: + f.write(" --leavebootorder") + append = self.boot_args - self.dracut_args if append: f.write(" --append=\"%s\"" % append) @@ -2054,7 +2057,10 @@ class IPSeriesGRUB2(GRUB2): # def install(self): - self.updateNVRAMBootList() + if flags.leavebootorder: + log.info("leavebootorder passed as an option. Will not update the NVRAM boot list.") + else: + self.updateNVRAMBootList() super(IPSeriesGRUB2, self).install() diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py index f7dd431..86a2cc2 100644 --- a/pyanaconda/flags.py +++ b/pyanaconda/flags.py @@ -68,6 +68,7 @@ class Flags(object): # device is self.virtpconsole = None self.gpt = False + self.leavebootorder = False # parse the boot commandline self.cmdline = BootArgs() # Lock it down: no more creating new flags! @@ -76,7 +77,7 @@ class Flags(object): self.read_cmdline() def read_cmdline(self): - for f in ("selinux", "sshd", "debug"): + for f in ("selinux", "sshd", "debug", "leavebootorder"): self.set_cmdline_bool(f) if "rpmarch" in self.cmdline: diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py index eed6470..4514169 100644 --- a/pyanaconda/kickstart.py +++ b/pyanaconda/kickstart.py @@ -256,7 +256,7 @@ class AutoStep(commands.autostep.FC3_AutoStep): flags.autostep = 1 flags.autoscreenshot = self.autoscreenshot -class Bootloader(commands.bootloader.F17_Bootloader): +class Bootloader(commands.bootloader.F18_Bootloader): def execute(self): if self.location == "none": location = None @@ -304,6 +304,9 @@ class Bootloader(commands.bootloader.F17_Bootloader): drive = self.anaconda.storage.devicetree.getDeviceByName(spec) self.anaconda.bootloader.stage1_drive = drive + if self.leavebootorder: + flags.leavebootorder = True + self.anaconda.dispatch.skip_steps("upgbootloader", "bootloader") class BTRFSData(commands.btrfs.F17_BTRFSData): -- 1.7.7.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list