On Tue, 5 Dec 2006, Jakob wrote:

I was wondering if there is a way to tell Grub to start another system than the default for the next reboot?

On lilo there is the command "lilo -R ..." whitch tells lilo to use the specified system for the next reboot and than switch back to the default after that.

There does not appear to be a quick-and-easy way to get grub to boot an entry in a "one-off" test run as you described.

The Grub info page does describe a hack that you can use that will yield the same result. It's in section 4.3.1 ("Booting once-only") of the grub info page, and it can be found at the below URL:

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

The trick they describe works like this:

Instead of configuring grub to boot the first entry:

default 0

You configure grub to boot the "default" entry:

default saved

... which you can set with the command "grub-set-default".

Then, for each of the boot stanzas in grub.conf, you include the "savedefault N" directive, which resets the default boot entry when the selected item is booted.

The effect is that the "default" boot entry is reset every time Grub boots something. For one-off cases where you only want to boot something once, you manually set it with "grub-set-default", and rely on the "savedefault N" directive in that one-off stanza to reset the grub default immediately after it's selected.

Joe
--
gentoo-user@gentoo.org mailing list

Reply via email to