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 | 4 +++- pyanaconda/kickstart.py | 5 ++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/anaconda b/anaconda index 4959a87..3e07ceb 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 29394b1..d2febb6 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1076,6 +1076,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) @@ -2055,7 +2058,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(args=["--no-nvram"]) diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py index 954400c..6e8b1a4 100644 --- a/pyanaconda/flags.py +++ b/pyanaconda/flags.py @@ -67,6 +67,8 @@ class Flags(object): # device is self.virtpconsole = None self.gpt = False + self.leavebootorder = False + self.leavebootorder = False # parse the boot commandline self.cmdline = BootArgs() # Lock it down: no more creating new flags! @@ -75,7 +77,7 @@ class Flags(object): self.read_cmdline() def read_cmdline(self): - for f in ("selinux", "debug"): + for f in ("selinux", "debug", "leavebootorder"): self.set_cmdline_bool(f) if "rpmarch" in self.cmdline: diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py index 8d313f0..0c7c520 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