CentOS 5.2编译最新内核2.6.27

编译内核首先去www.kernel.com上下载最新的kernel代码
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.tar.gz
# tar zxvf linux-2.6.27.tar.gz -C /usr/src
# cd /usr/src/linux-2.6.27
# make menuconfig
现在出现一个字符界面,主要是去掉诸如wireless等服务器根本用不着的功能。
弄完了,保存,退出。
# make (可能要很长时间)
# make modules_install
# cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.27-yourname (注意:目录i386是根据你的系统类型, 如果是64位系统, 那就很可能是x86_64)
# cp System.map /boot/System.map-2.6.27-yourname
# mkinitrd /boot/initrd-2.6.27-yourname.img   2.6.27
# vi /etc/grub.conf
在GRUB选择刚刚编译的内核,


<blockquote>
title CentOS (2.6.27-yourname)
        root (hd0,0)
        kernel /vmlinuz-2.6.27-yournamero root=LABEL=/
        initrd /initrd-2.6.27-yourname.img
title CentOS (2.6.18-92.1.13.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=LABEL=/
        initrd /initrd-2.6.18-92.1.13.el5.img</blockquote>


 


# reboot
完毕! 祝你好运

2008年10月27日 | 归档于 Linux教程
标签:
本文目前尚无任何评论.

发表评论

XHTML: 您可以使用这些标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>