如果你安装了 GRUB 或 LILO 引导装载程序,kernel RPM 软件包配置它们来引导刚刚安装的内核,但是它并不配置引导装载程序默认引导新内核。
确认一下引导装载程序已被配置成引导新内核总是值得提倡的。这是至关重要的一步。如果引导装载程序被配置得不正确,你将无法引导你的系统。若这种情况发生了,使用你从前创建的引导盘来引导你的系统,然后再试图配置你的引导装载程序。
如果你选择了 GRUB 作为引导装载程序,请确认 /boot/grub/grub.conf 文件中包含的 title 部分中的版本与你刚刚安装的 kernel 软件包的版本相同(如果你安装了 kernel-smp 和/或 kernel-bigmem,你也会看到这个部分):
# 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/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=3
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-2.47.1)
root (hd0,0)
kernel /vmlinuz-2.4.20-2.47.1 ro root=LABEL=/
initrd /initrd-2.4.20-2.47.1.img
title Red Hat Linux (2.4.20-2.30)
root (hd0,0)
kernel /vmlinuz-2.4.20-2.30 ro root=LABEL=/
initrd /initrd-2.4.20-2.30.img |
如果你创建了单独的 /boot 分区,到内核与 initrd 映像的路径是相对于 /boot 分区而言的。
注意,默认引导项目没有被设置为新内核。要配置 GRUB 来默认引导新内核,把 default 变量的值改成包含新内核的 title 部分的号码。这个号码从 0 开始。例如,如果新内核是第二个 title 部分,把 default 设置为 1。
你可以重新引导计算机来开始测试这个新内核,观察屏幕上的消息来确保硬件被正确地检测到了。
如果你选择了 LILO 作为引导装载程序,请确认 /etc/lilo.conf 文件中包含的 image 部分中的版本与你刚刚安装的 kernel 软件包的版本相同(如果你安装了 kernel-smp 和/或 kernel-bigmem,你也会看到这个部分):
prompt
timeout=50
default=2.4.20-2.30
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinuz-2.4.20-2.47.1
label=2.4.20-2.47.1
initrd=/boot/initrd-2.4.20-2.47.1.img
read-only
append="root=LABEL=/"
image=/boot/vmlinuz-2.4.20-2.30
label=2.4.20-2.30
initrd=/boot/initrd-2.4.20-2.30.img
read-only
append="root=LABEL=/" |
注意,默认引导项目没有被设置为新内核。要配置 LILO 来默认引导新内核,把 default 变量的值改成包含新内核的 image 部分中的 label 的值。以根用户身份运行 /sbin/lilo 命令来启用改变。运行后,其输出会与如下相似:
Added 2.4.20-2.47.1 * Added linux |
2.4.20-2.47.1 后面的 * 意味着那部分中的内核是 LILO 会默认引导的内核。
你可以重新引导计算机来开始测试这个新内核,观察屏幕上的消息来确保硬件被正确地检测到了。