linux内核升级到3.4

花了一天的时间,终于把centos5的linux内核版本从2.6.18升级到3.4. 升级后,系统更加稳定.

具体步骤:
# wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.tar.gz
# tar zxvf linux-3.4.tar.gz -C /usr/src
# cd /usr/src/linux-3.4
# make menuconfig
# make
# make modules_install
# cp arch/x86_64/boot/bzImage /boot/vmlinuz-3.4
# mkinitrd /boot/initrd-3.4.img 3.4.0
# 把新编译的内核加到/etc/grub.conf
default=0
timeout=5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu

title Centos5 (3.4.0)
        root (hd0,2)
        kernel /boot/vmlinuz-3.4 ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-3.4.img

title Centos5 (2.6.18-53.el5)
        root (hd0,2)
        kernel /boot/vmlinuz-2.6.18-53.el5 ro root=LABEL=/1 rhgb quiet
        initrd /boot/initrd-2.6.18-53.el5.img

# reboot

下面是一些经验:
1. gcc的版本仍然是centos5的版本
2. 如果编译完重启后出现mount:could not find filesystem /dev/root的错误,解决办法是:
重新make menuconfig, 使CONFIG_SYSFS_DEPRECATED_V2=y(可以打开文件.config验证)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值