this is a RHEL5 system. Here is my grub.conf file.
default=0timeout=10title RHEL known *good* kernelroot (hd0,0)kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/OS/vol1 rhgb quietinitrd /initrd-2.6.18-164.el5.imgsavedefaulttitle RHEL *new* kernelroot (hd0,0)kernel /vmlinuz-2.6.18-194.8.1.el5 ro root=/dev/OS/vol1 rhgb quiet panic=5initrd /initrd-2.6.18-194.8.1.el5.img |
My “untested” kernel is the second item listed. The kernel param panic=5 will cause the system to automatically reset after 5 seconds following the event of a kernel panic. Otherwise, the server would be stuck in a crashed state until someone could physically intervene and power cycle the server.
Now comes the interesting part. We need to tell grub to set the “untested” kernel as the default and to boot it only once. We can do this from the grub shell.
# grubgrub> savedefault --default=1 --oncesavedefault --default=1 --oncegrub> quit |
As you can see I tell grub to save the “untested” kernel (–default=1) as the default for one-time only (–once).