Gentoo Archives: gentoo-user

From: Flophouse Joe <flophousejoe-gentoo-user-xdzvne@××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Grub set default for next reboot?
Date: Tue, 05 Dec 2006 23:20:55
Message-Id: Pine.LNX.4.64.0612051757410.16681@becky16.halibutdepot.org
1 On Tue, 5 Dec 2006, Jakob wrote:
2
3 > I was wondering if there is a way to tell Grub to start another system
4 > than the default for the next reboot?
5
6 > On lilo there is the command "lilo -R ..." whitch tells lilo to use the
7 > specified system for the next reboot and than switch back to the
8 > default after that.
9
10 There does not appear to be a quick-and-easy way to get grub to boot an
11 entry in a "one-off" test run as you described.
12
13 The Grub info page does describe a hack that you can use that will yield
14 the same result. It's in section 4.3.1 ("Booting once-only") of the grub
15 info page, and it can be found at the below URL:
16
17 http://www.gnu.org/software/grub/manual/html_node/Booting-once_002donly.html#Booting-once_002donly
18
19 The trick they describe works like this:
20
21 Instead of configuring grub to boot the first entry:
22
23 default 0
24
25 You configure grub to boot the "default" entry:
26
27 default saved
28
29 ... which you can set with the command "grub-set-default".
30
31 Then, for each of the boot stanzas in grub.conf, you include the
32 "savedefault N" directive, which resets the default boot entry when the
33 selected item is booted.
34
35 The effect is that the "default" boot entry is reset every time Grub
36 boots something. For one-off cases where you only want to boot something
37 once, you manually set it with "grub-set-default", and rely on the
38 "savedefault N" directive in that one-off stanza to reset the grub
39 default immediately after it's selected.
40
41 Joe
42 --
43 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Grub set default for next reboot? Neil Bothwick <neil@××××××××××.uk>