[PATCH] 0/2 RFC: yaboot --bootonce

Dustin Kirkland dustin.kirkland at us.ibm.com
Tue Sep 19 08:07:15 EST 2006


Often when building and testing kernels, one wants to boot a specific
kernel in an unattended manner.  Changing the default kernel in the
bootloader configuration file fulfills this purpose, however, it creates
a problem when the newly booted kernel is buggy or does not boot.

Ideally, one would be able to specify to the bootloader that a
particular kernel is to be booted once on the very next boot, but
subsequent boots would revert back to the default kernel behavior
specified in the bootloader configuration file.

Other Linux bootloaders provide this functionality in one way or
another.  In the automated Linux testing space, we have a need for
Yaboot to provide this functionality for our PPC platforms in an
unattended manner.

The following patch set is submitted as a Request for Comments in that a
small bit of functionality is still missing and I could use some
assistance with that piece.

The design is as follows:

- 1/2: In userspace, extend ybin to understand a --bootonce parameter,
which takes a bootloader entry label.  If this is an existing, valid
label in the bootloader configuration file, perform a raw write of that
value to an empty block in the PReP boot partition.

- 2/2: In bootloader-space, extend the 'default' kernel determination to
first examine the reserved block in the PReP boot partition for bootonce
information.  If a valid bootloader entry label is found there, use that
label as the 'default' entry for this boot, and zero out the data in
that block so as to not affect subsequent boots.


Patches follow.  The userspace patch works as is.  The bootloader-space
is a design prototype requiring some assistance.  Comments and/or code
would be appreciated.

-- 
:-Dustin




More information about the Yaboot-devel mailing list