Re: [gentoo-user] Grub set default for next reboot?

2006-12-06 Thread Flophouse Joe

On Wed, 6 Dec 2006, Neil Bothwick wrote:

grub-set-default only sets it for one boot, so your default, which 
would sensibly be set to a known working kernel, takes over next time.


I still don't see how grub-set-default has any provisions for booting a 
kernel just once and then automatically causing some other kernel to be 
booted on subsequent boots.  The documentation for grub-set-default makes 
no mention of this functionality and provides workarounds that wouldn't 
be necessary if it existed.


Is it possible that I'm missing some sort of --once-only option that 
you can pass to grub-set-default?


Based on my reading and on my testing, the only way to get grub to boot a 
kernel just once as the original poster described is to use each of 
default saved, grub-set-default, and multiple occurences of 
savedefault N-- grub-set-default alone can't do the job.


If there's a better way to get lilo -R-like behavior in grub, then I'd 
like to learn it.  Could you please provide an example or a link to 
documentation?


There's also a fall back option to specify a kernel to boot in the 
event of a failure of the default. Maybe your are thinking of 
savedefault fallback which sets this.


I saw that as well, but I don't think I was thinking of that.

Anyway, the answer still remains, that with grub-set-default and a 
suitable configuration, GRUB will do the same as lilo -R. That's the 
reason I am comfortable using it on a headless server as well as 
desktops.


Agreed completely.

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



Re: [gentoo-user] Grub set default for next reboot?

2006-12-05 Thread Flophouse Joe

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



Re: [gentoo-user] Grub set default for next reboot?

2006-12-05 Thread Neil Bothwick
On Tue, 5 Dec 2006 18:12:17 -0500 (EST), Flophouse Joe wrote:

  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.

Yes there is, grub-set-default. It takes a single numeric argument, which
overrides the default in menu.lst for the next boot only.


-- 
Neil Bothwick

Boss spelled backwards is double-SOB


signature.asc
Description: PGP signature


Re: [gentoo-user] Grub set default for next reboot?

2006-12-05 Thread Flophouse Joe
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.


Yes there is, grub-set-default. It takes a single numeric argument, 
which overrides the default in menu.lst for the next boot only.


Really?  I included a link to the Booting once-only node of the grub 
info page in my previous post, and I didn't get that impression from 
reading it.


My interpretation is that grub-set-default-- by itself-- isn't capable of 
overriding the default boot entry in grub.conf for just one time.


Instead, the info page recommends using grub-set-default to set your 
desired boot entry for the next boot only, and then *also* specifying 
your normal default with a savedefault directive in each of your boot 
stanzas in order to reset it to what you really want to boot from next 
time.


It seems like if you used grub-set-default and omitted the savedefault 
directive from whatever you were booting, grub would never have its 
default boot entry reset to its normal value.  If you used 
grub-set-default and did nothing else, then you'd always boot the new 
kernel.


On the other hand, if grub-set-default were able to set a 
for-this-boot-only boot entry by itself, then why would the info page 
describe this sillier workaround?


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



Re: [gentoo-user] Grub set default for next reboot?

2006-12-05 Thread Jakob

On 12/6/06, Flophouse Joe [EMAIL PROTECTED]
wrote:


 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.

 Yes there is, grub-set-default. It takes a single numeric argument,
 which overrides the default in menu.lst for the next boot only.

Really?  I included a link to the Booting once-only node of the grub
info page in my previous post, and I didn't get that impression from
reading it.

My interpretation is that grub-set-default-- by itself-- isn't capable of
overriding the default boot entry in grub.conf for just one time.

Instead, the info page recommends using grub-set-default to set your
desired boot entry for the next boot only, and then *also* specifying
your normal default with a savedefault directive in each of your boot
stanzas in order to reset it to what you really want to boot from next
time.

It seems like if you used grub-set-default and omitted the savedefault
directive from whatever you were booting, grub would never have its
default boot entry reset to its normal value.  If you used
grub-set-default and did nothing else, then you'd always boot the new
kernel.

On the other hand, if grub-set-default were able to set a
for-this-boot-only boot entry by itself, then why would the info page
describe this sillier workaround?

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

thanks for your help I will try that one.


regards

jakob