Rebuild CentOS6.0 Kernel

OS: CentOS 6.0 x86_86
Kernel version: 2.6.32-71.29.1.el6.x86_64

1. Download the kernel source from kernel.org.
linuxdba -->wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.gz
linuxdba -->cp linux-2.6.39.tar.gz /usr/src
2. Extract the kernel source and create the symbolic link.
linuxdba -->tar xvf linux-2.6.39.tar.gz
linuxdba -->ln -s linux-2.6.39 linux
linuxdba -->ll
total 93748
lrwxrwxrwx.  1 root root       12 Oct 11 18:13 linux -> linux-2.6.39
drwxr-xr-x. 23 root root     4096 May 19 12:06 linux-2.6.39
-rw-r--r--.  1 root root 95993809 Oct 11 18:12 linux-2.6.39.tar.gz


3. Compile the kernel source.
linuxdba -->cd linux
linuxdba -->make mrproper
linuxdba -->make clean
linuxdba -->vi Makefile
---
     EXTRAVERSION =
+++
     EXTRAVERSION = .el6.x86_64

linuxdba -->make menuconfig     // Create ".config" file.
linuxdba -->make bzImage   
linuxdba -->make modules
linuxdba -->make modules_install
linuxdba -->make initrd-2.6.39.el6.x86_64.img 2.6.39.el6.x86_64

4. Install the new kernel
linuxdba -->cp System.map  /boot/System.map-2.6.39.el6.x86_64
linuxdba -->cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.39.el6.x86_64
linuxdba -->cp initrd-2.6.39.el6.x86_64.img /boot/
linuxdba -->vi /etc/grub.conf
title linuxdba(2.6.39.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.39.el6.x86_64 ro root=UUID=5caadab1-90a5-4c79-9d99-c1fff1c7149b
    initrd /initrd-2.6.39.el6.x86_64.img


5. Reboot and Enjoy!
linuxdba -->reboot   //select and boot with this "linuxdba" kernel
linuxdba -->uname -r
2.6.39.el6.x86_64

Reference Page:
  http://www.cromwell-intl.com/unix/linux-kernel.html
  http://blog.csdn.net/liuy5277/article/details/6863751
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值