以下设置都是基于 Red Hat Linux 9.0 或 Redhat Enterprise Linux 等版本。
如果你创建了单独的 /boot 分区,到内核与 initrd 映像的路径是相对于 /boot 分区而言的。 ————《Red Hat Linux 9: Red Hat Linux 定制指南 30. 升级内核》
1) 有 /boot 分区时的 /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/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.9-e.12)
root (hd0,0)
kernel /vmlinuz-2.4.9-e.12 ro root=/dev/hda3
initrd /initrd-2.4.9-e.12.img
2) 没有 /boot 分区时的 /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 do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title The Linux Kernel (2.6.10)
root (hd0,0)
kernel /boot/bzImage-2.6.10 ro root=LABEL=/
initrd /boot/initrd-2.6.10.img
要创建引导盘,在 shell 提示下登录为根用户,然后键入以下命令:
/sbin/mkbootdisk `uname -r`
(END)