Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42991 - grub needs 'lilo -R' functionality provided by existing patch
Summary: grub needs 'lilo -R' functionality provided by existing patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 55732
Blocks:
  Show dependency tree
 
Reported: 2004-02-26 07:57 UTC by Andrew Gaffney (RETIRED)
Modified: 2004-09-09 10:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gaffney (RETIRED) gentoo-dev 2004-02-26 07:57:18 UTC
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:
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2004-02-26 15:23:32 UTC
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.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2004-02-26 22:04:10 UTC
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).
Comment 3 Matt 2004-03-04 02:22:06 UTC
I can confirm this works as well, and would enjoy seeing it added.
Comment 4 Matt 2004-03-04 02:34:15 UTC
It should probably also be noted that DedRat uses this patch in their grub by default, so it seems well tested.
Comment 5 Robert Moss (RETIRED) gentoo-dev 2004-07-11 23:02:00 UTC
This is provided in the grub-0.95 ebuild in bug #55732. Adding this as a dependency.
Comment 6 Robert Moss (RETIRED) gentoo-dev 2004-08-23 17:12:05 UTC
Full savedefault support present in new grub-0.95.20040823 ebuild. Closing.
Comment 7 Robert Moss (RETIRED) gentoo-dev 2004-08-24 10:57:30 UTC
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 :-)
Comment 8 Lars Petersen 2004-09-09 07:46:39 UTC
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
Comment 9 Robert Moss (RETIRED) gentoo-dev 2004-09-09 09:54:57 UTC
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.
Comment 10 Lars Petersen 2004-09-09 10:09:46 UTC
Thanks for the confirmation, Robert. I opened this new bug:
http://bugs.gentoo.org/show_bug.cgi?id=63445