grub.conf内核启动失败的fallback设置范例如下,内核启动时候,我们默认使用default 1 CentOS (2.6.18-308.4.1.el5xen)启动,如果启动失败,系统会尝试 fallback 0 CentOS (2.6.18-308.4.1.el5), 这对于远程管理服务器来说,特别是新安装内核,修改 grub.conf启动文件重启机器的时候,特别保险。ctohome.com推荐大家都设置这个参数
[[email protected]]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
#boot=/dev/sda
default 1
timeout 5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
fallback 0
title CentOS (2.6.18-308.4.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-308.4.1.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-308.4.1.el5.img
title CentOS (2.6.18-308.4.1.el5xen)
root (hd0,0)
kernel /xen.gz-4.1.2
module /vmlinuz-2.6.18-308.4.1.el5xen ro root=LABEL=/ rhgb quiet
module /initrd-2.6.18-308.4.1.el5xen.img
title CentOS (2.6.18-308.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-308.el5.img
[[email protected]]# uname -a
Linux host621.com 2.6.18-308.4.1.el5 #1 SMP Tue Apr 17 17:08:00 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[[email protected]]#