Cure 发表于 2003-7-18 17:46:56

Redhat 9.0 下利用 up2date 升级内核

1. 运行 up2date
2. 提示输入 root 密码
3. 在提示跳过软件包界面选上两个内核相关的软件包 (表示不跳过内核的升级)
4. 后面的按提示走

升级完后, 在系统启动选项里会多了一个内核启动选项
这时实际已经可以以新内核启动了, 甚至可以顺利启动 x
前提是你用的是 redhat 自带的显卡驱动

而拿我自己的情况来说, 我的显卡的 nvidia 的, 而且用了它官方的驱动
驱动的东西是和内核相关的, 所以, 为了让新内核顺利工作, 后面的工作不言自明:

把和内核相关的程序卸载再在新内核启动的环境下重装

比如我就只做了两件事:
1. 把显卡驱动卸了重装, startx ok
2. 把声卡的 alsa 驱动重编译装上, 一切搞定

最后, 如果你不再想菜单里出现旧内核的选项 (这时的旧内核应该无法正常使用了, 除非你把显卡驱动改回redhat自带的驱动, 声卡也一直用默认驱动)
很简单, 以 root 账号 vi /boot/grub/menu.lst

比如我的 menu.lst 刚升级完内核后看起来是这样的:


# 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,4)
#          kernel /vmlinuz-version ro root=/dev/hda7
#          initrd /initrd-version.img
#boot=/dev/hda5
default=0
timeout=10
splashimage=(hd0,4)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-18.9)
      root (hd0,4)
      kernel /vmlinuz-2.4.20-18.9 ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-18.9.img
title Red Hat Linux (2.4.20-8)
      root (hd0,4)
      kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8.img
title WinXP
      rootnoverify (hd0,0)
      chainloader +1

为了让旧内核 (2.4.20-8) 的选项消失, 只需要把

title Red Hat Linux (2.4.20-8)
      root (hd0,4)
      kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
      initrd /initrd-2.4.20-8.img

删掉, 一切 ok

总而言之, redhat 在 update 这方面做得很不错, 尤其对于我这样懒惰又傻瓜的用户来说, 简直就是福音:)

Dragonfly 发表于 2003-7-18 21:16:14

yes, i think we need both ways. up2date stuff for common users. and manually customization for advanced users.
页: [1]
查看完整版本: Redhat 9.0 下利用 up2date 升级内核