Grub Fallback -- Is it for real?

Warren Togami wtogami at redhat.com
Mon Mar 13 21:23:35 UTC 2006


Janina Sajka wrote:
> 
> Should I expect this to work? Is there some other mechanism to boot a
> different kernel just once--on the next boot?

http://togami.com/~warren/guides/remoteraidcrazies/
My guide here has an example of using grub's savedefault --default X 
--once directives in order to specify a kernel to boot next.  It tries 
to boot that kernel.  If you reboot again, it falls back to the first 
listed kernel in grub.conf.

In order to use this type of fallback, you need to move your "known 
good" kernel to be in the first position.  Then change 
/boot/grub/grub.conf so "default=saved".  Then savedefault --default X 
--once chooses a kernel specified by X, which begins counting at zero.

I personally use savedefault --default X --once on my dedicated server 
where I have no physical access, but I do have remote power cycling 
capability.  This way I can reboot into an experimental kernel, and 
trigger a reboot into the original kernel if it got "stuck" during bootup.

Another option is to use "panic=X" where X is a number of seconds.  This 
triggers an automatic reboot if the kernel panics.  It doesn't always 
work, but might be useful in some cases where you don't have physical 
access to the box.  I personally don't use panic=X anymore after I 
gained remote power cycling capability.

Warren Togami
wtogami at redhat.com




More information about the fedora-devel-list mailing list