RFE: specify a kernel to boot once

Bryce Harrington bryce at osdl.org
Wed Jun 28 07:53:31 EST 2006


On Tue, Jun 27, 2006 at 04:10:50PM -0500, Dustin Kirkland wrote:
> On Fri Jan 13 23:40:33 EST 2006, Paul Nasrat wrote:
> > I'd like to focus on moving forward on the 1.3.x branch. So here
> > is a list of of goals and tasks that I think need to be worked on.
> ...
> > Future stable tree development - poll people for what they need/want for
> > 1.3.x series.
> ...
> > If people can think of specifics features/bugs please let me know. 
> 
> A particular enhancement that I think would be desirable for yaboot
> would be a mechanism in ybin to specify a particular kernel to boot only
> once.
> 
> If the kernels in yaboot.conf are enumerated starting at 0, then
> something like:
> 
> # ybin --bootonce 3
> 
> would specify that the 4th entry in the bootloader configuration is to
> be booted the next time the machine reboots.

For reference, the way it's done in lilo is with the -R argument:

  # lilo -R my_kernel_8

> ybin would need to save the current default kernel to a temporary
> variable (I think grub calls it savedefault), and modify the default.
> Have yaboot, if it detects a value in savedefault, update the default
> image that value (thus restoring the default).

Grub stores the default in /boot/grub/default.  savedefault is the
command to use in your grub.conf boot entry to update the contents of
that file.  It also has a grub-set-default script that can set it.

Here's the reference for grub's boot-once capability, with an example:

  http://www.gnu.org/software/grub/manual/html_node/Booting-once_002donly.html#Booting-once_002donly

I suppose there's pros and cons to each approach.  In practice we found
lilo's approach to be easier to automate because it was not necessary to
parse/write config files.  Getting grub's boot-once functionality
automated was pretty tricky and took a lot of testing, but it works.

Thanks,
Bryce

> I know that such functionality would be very useful in some automated
> kernel testing circles (where one is using automation to build/install a
> kernel and wants to boot into that kernel, without adversely affecting a
> known, good fallback kernel).
> 
> In particular, the Linux::Bootloader perl module seeks to abstract away
> many of the complicated and diverse bootloader particulars and provide a
> single, consistent interface--again useful in automated Linux testing
> circles.  That module would very much benefit from this feature.
> 
> In the meantime, any hacks or workarounds would be very much appreciated
> from the general yaboot populace....?
> 
> 
> :-Dustin



More information about the Yaboot-devel mailing list