how to upgrade CentOS kernel

本文介绍了如何升级CentOS系统的内核,包括复制配置文件、使用oldconfig或defconfig、执行make localmodconfig、重启选择新内核以及可能需要编辑initrd文件等步骤。同时提供了多个参考资料链接,帮助理解内核配置选项和升级过程。
摘要由CSDN通过智能技术生成

1,wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.4.tar.bz2
2, make mrproper

3, cp /boot/config* .config ; make oldconfig

 or  make defconfig [ use the sample config as the .config file (linux-2.6.24.4/arch/x86/configs/i386_defconfig)]

或者更好的使用命令make localmodconfig来产生配置

4, make dep  
5, Make kernel and install
make -j4 bzImage V=1
make -j4 modules V=1 
make modules_install V=1 

6, install others
   cp arch/x86/boot/bzImage       /boo/bzImage-2.6.24
   cp System.map         /boo/System.map-2.6.24 
   mkinitrd -v /boot/initrd-2.6.24.img  2.6.24.4

7, Add strings below to grub/menu.lst
        title CentOS (2.6.24)
        root (hd0,0)
        kernel /bzImage-2.6.24 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.24.img

8,reboot and select your new kernel

9,有可能需要编辑initrd文件
  解压:

 #  zcat initrd.gz | cpio -ivd --no-absolute-filenames
  打包:
# find . | cpio -o -H newc -F tmp_initrd2
# gzip -f9 tmp_initrd2

10, 查看帮组 

[root@Tony32 linux-2.6.39]# make help

11,配置工具比较:

Command
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值