Sunday, January 30, 2005

How to make a grub load a kernel in failsafe mode

The following marked in red will make the kernel panic (meaning if it doesn't boot in 5 seconds it will reboot)

title CentOS (2.4.21-27.0.2.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.0.2.EL ro root=LABEL=/ panic=5
initrd /initrd-2.4.21-27.0.2.EL.img

panic=5 is the command.

if you use grub as a boot loader and you want to load this for the first time to see if it boots OK, do the following:

On shell do "grub" it will take a while once you see grub > type the command:

savedefault --default=0 --once

Will boot the first kernel on grub.conf

w00t!

First post.