首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

linux 内核晋级 centos

2014-06-18 
linux 内核升级 centos喜新厌旧不是一个贬义词!比如,对于linux来说~虚拟机上装了一个centos 5.5,内核是2.6

linux 内核升级 centos
linux 内核晋级 centos        喜新厌旧不是一个贬义词!比如,对于linux来说~
        虚拟机上装了一个centos 5.5,内核是2.6.18的。本着与时俱进的党的号召,闲的时候我想把我的内核升级一下了!于是度娘了一番,可是事情总是不能按照预期的轨迹走,生活却还得继续,自己摸索吧!

        为了不由太大的跨越,我选择了升级到2.6.19.
        1、在ftp://ftp.kernel.org/pub/linux/kernel/v2.6 上下载了2.6.19的内核linux-2.6.19.tar.bz2        2、cp  linux-2.6.19.tar.bz2 /usr/src/kernel/ cp到/usr/src/kernel下 (有的发行版本没有kernel目录)
        3、tar -jxvf linux-2.6.19.tar.bz2 解压到当前目录        4、配置内核。我建议有两种方法
                a、直接make menuconfig,然后quit,save
                b、把/boot/config-2.6.18 直接cp到根目录下为.config        5、make
        6、make bzImage
        7、make modules
        8、make modules_install
        9、mkinitrd /boot/initrd-2.6.19 2.6.19
        10、cp /usr/src/kernel/linux-2.6.19/arch/i386/boot/bzImage /boot/vmlinuz-2.6.19        11、vim /boot/grub/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/VolGroup00/LogVol00#          initrd /initrd-version.img#boot=/dev/hdadefault=1timeout=15splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitle CentOS (2.6.18-194.el5)root (hd0,0)kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quietinitrd /initrd-2.6.18-194.el5.img

在后面添加自己的启动项和内核        title CentOS (2.6.19-lin)root (hd0,0)kernel /vmlinuz-2.6.19 ro root=/dev/VolGroup00/LogVol00 rhgb quietinitrd /initrd-2.6.19.img
OK,大功告成,reboot就可以啦!linux 内核晋级 centos
linux 内核晋级 centos

热点排行