ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Linux--用rpm package來升級OS kernel step

Linux--用rpm package來升級OS kernel step

原创 Linux操作系统 作者:vongates 时间:2019-06-04 12:30:05 0 删除 编辑

$ rpm -ivh kernel-2.4.9-e.57.i686.rpm

$ rpm -ivh kernel-smp-2.4.9-e.57.i686.rpm

$ rpm -Uvh kernel-headers-2.4.9-e.57.i386.rpm(直接upgrade 舊的不存在)

$ vi /etc/lilo.conf    OR  vi /etc/grub.conf

實例全過程


[root@uwmesdb3 root]# 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/sdb1
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux Advanced Server (2.4.9-e.17smp)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.17smp ro root=/dev/sdb1
        initrd /initrd-2.4.9-e.17smp.img
title Red Hat Linux Advanced Server-up (2.4.9-e.17)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.17 ro root=/dev/sdb1
        initrd /initrd-2.4.9-e.17.img
[root@uwmesdb3 root]# cd /tmp/kernel/2.4.9.e.57/
[root@uwmesdb3 2.4.9.e.57]# ls
fileutils-4.1-10.8.i386.rpm         kernel-smp-2.4.9-e.57.i686.rpm
kernel-2.4.9-e.57.i686.rpm          mkinitrd-3.2.6.2-1.i386.rpm
kernel-headers-2.4.9-e.57.i386.rpm
[root@uwmesdb3 2.4.9.e.57]# uname -a
Linux uwmesdb3.unitedwin.com.cn 2.4.9-e.17smp #1 SMP Mon Mar 31 21:33:37 EST 2003 i686 unknown
[root@uwmesdb3 2.4.9.e.57]# rpm -ivh kernel-smp-2.4.9-e.57.i686.rpm
Preparing...                ########################################### [100%]
   1:kernel-smp             ########################################### [100%]
[root@uwmesdb3 2.4.9.e.57]# rpm -ivh kernel-2.4.9-e.57.i686.rpm
Preparing...                ########################################### [100%]
   1:kernel                 ########################################### [100%]
[root@uwmesdb3 2.4.9.e.57]# rpm -Uvh kernel-headers-2.4.9-e.57.i386.rpm
Preparing...                ########################################### [100%]
   1:kernel-headers         ########################################### [100%]
[root@uwmesdb3 2.4.9.e.57]# rpm -qa |grep fileutils
fileutils-4.1-10.1
[root@uwmesdb3 2.4.9.e.57]# rpm -Uvh fileutils-4.1-10.8.i386.rpm
Preparing...                ########################################### [100%]
   1:fileutils              ########################################### [100%]
[root@uwmesdb3 2.4.9.e.57]# rpm -qa |grep mkinitrd
mkinitrd-3.2.6-1
[root@uwmesdb3 2.4.9.e.57]# rpm -Uvh mkinitrd-3.2.6.2-1.i386.rpm
Preparing...                ########################################### [100%]
   1:mkinitrd               ########################################### [100%]
[root@uwmesdb3 root]# 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/sdb1
#          initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.9-e.57)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.57 ro root=/dev/sdb1
        initrd /initrd-2.4.9-e.57.img
title Red Hat Linux (2.4.9-e.57smp)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.57smp ro root=/dev/sdb1
        initrd /initrd-2.4.9-e.57smp.img
title Red Hat Linux Advanced Server (2.4.9-e.17smp)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.17smp ro root=/dev/sdb1
        initrd /initrd-2.4.9-e.17smp.img
title Red Hat Linux Advanced Server-up (2.4.9-e.17)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.17 ro root=/dev/sdb1
        initrd /initrd-2.4.9-e.17.img
[root@uwmesdb3 root]# uname -a
Linux uwmesdb3.unitedwin.com.cn 2.4.9-e.57smp #1 SMP Thu Dec 2 20:51:12 EST 2004 i686 unknown
[root@uwmesdb3 root]#

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51658/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-09-11

  • 博文量
    274
  • 访问量
    199578