There is a patch that will allow you to specify a one-time default entry for the next boot using a command such as 'savedefault --default=1 --once' in the grub shell. This is equivelant to the 'lilo -R' command. Patch is here: http://mail.gnu.org/archive/html/bug-grub/2002-02/msg00151.html This would be an especially handy feature for many of us remote administrators. Reproducible: Always Steps to Reproduce:
I applied the patch to 0.94 and it compiled cleanly. The grub shell allows me to use that option. The option also appears if I do 'help savedefault' in the grub shell.
I can confirm that this patch works successfully against 0.94. I ran 'grub' and issued the command 'savedefault --default=1 --once' and then rebooted. When grub came up, the 2nd option was selected as default. I rebooted again and it was back to the first option (per my grub.conf).
I can confirm this works as well, and would enjoy seeing it added.
It should probably also be noted that DedRat uses this patch in their grub by default, so it seems well tested.
This is provided in the grub-0.95 ebuild in bug #55732. Adding this as a dependency.
Full savedefault support present in new grub-0.95.20040823 ebuild. Closing.
In response to whoever it was who e-mailed me about this (sorry, I lost the e-mail), you have to manually install grub again once you've used portage to update it. Otherwise, if you blindly copy over things in /boot/grub, the stage* files and MBR won't match, which is a minefield we don't want to get into. So you'll need the files from /usr/lib/grub/* and /lib/grub/*/* copying to /boot/grub, then you'll need to run /sbin/grub to install it into the MBR. Once you've done that, grub-set-default (documented, check info grub - manpage isn't installed by default yet, sorry, not worked that one out) is your friend :-)
For me, the 'savedefault' support in grub-0.95.20040823 does *not* work as expected. In fact, savedefault doesn't work at all any more, not even the plain old 'savedefault' directive in grub.conf. Any invocation of 'savedefault' with or without options leads to an 'Error 27: Unrecognized command'. Tab completion of the savedefault command, however, works fine; 'help savedefault' prints out some usage info, although with a whole different syntax: savedefault: savedefault [NUM | `fallback'] Save the current entry as the default boot entry if no argument is specified. If a number is specified, this number is saved. If `fallback' is used, next fallback entry is saved. grub-set-default does its job, and a subsequent 'default saved' actually boots the default entry selected this way. But a 'savedefault' directive in my grub.conf just causes grub to complain and not boot that entry. Is it just me? Or is it just me and the guy in this post: http://groups.google.com/groups?ie=UTF-8&selm=2xS5q-6SL-25%40gated-at.bofh.it ? Any help or comments would be appreciated! Thanks in advance, Lars
I can confirm this, but this stuff belongs in a new bug - mind opening one? In the meantime I'll bug the people in #grub to see what I can get out of them.
Thanks for the confirmation, Robert. I opened this new bug: http://bugs.gentoo.org/show_bug.cgi?id=63445