前段时间安装了centos5.5,内核是:2.6.18-194.e15,最近看到Linux内核发布了 2.6.36 稳定版:
内核更新的亮点:
1.Tilera 处理器架构支持。
2.新的文件通知接口 fanotify。
3.Intel 显卡上实现 KMS 和 KDB 的整合。
4.并行管理工作队列。
5.Intel i3/5 平台上内置显卡和 CPU 的智能电源管理。
6.CIFS 文件系统本地缓存。
7.改善虚拟内存的层级结构,提升桌面操作响应速度。
8.改善虚拟内存溢出终结器的算法。
9.整合了 AppArmor 安全模型(注:与 SELinux 基于文件的标注不同, AppArmor 是基于路径的)。
将centos5.5内核升级到2.6.36
内核下载地址:http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.36.tar.bz2
[root@localhost soft]# tar jxvf linux-2.6.36.tar.bz2
[root@localhost soft]# cd linux-2.6.36
[root@localhost linux-2.6.36]# make menuconfig
networking support—>networking options—>network packet filtering framework(netfilter)
(1).core netfilter configuration
A 勾中”Netfilter connection tracking support” -m state相关模块是依赖它的,不选则没有。
B 将netbios name service protocal support(new) 编译成模块,不然后面升级iptables后启动时会出错
C 勾中“Netfilter Xtables support (required for ip_tables)”
(2).IP: Netfilter Configuration
A 将 “IPv4 connection tracking support (require for NAT)” 编译成模块。
B 勾中IP tables support (required for filtering/masq/NAT) 。
C 将 “Full NAT” 下的 “MASQUERADE target support” 和 “REDIRECT target support” 编译成模块
(3).其它模块可以根据自己的需要进行选择,若不懂可以参考内核配置手册.
执行完make menuconfig后,修改/data/soft/linux-2.6.36/.config
将#CONFIG_SYSFS_DEPRECATED_V2 is not set
默认被注释掉的,将其改为y。即修改为
CONFIG_SYSFS_DEPRECATED_V2=y
再接着编译安装内核,如果没有修改重启进入系统的时候将会报错:“mount: could not find filesystem ‘/dev/root’”
[root@localhost linux-2.6.36]# make modules
[root@localhost linux-2.6.36]# make modules_install
[root@localhost linux-2.6.36]# make install
[root@localhost linux-2.6.36]# reboot
重启后可以看到grub引导有两个系统:即2.6.36和2.6.18-194.e15
启动的时候会出现报错信息:“”insmod: error inserting ‘/lib/dm-region-hash.ko’: –1 File exits”,”
不过不影响进入系统,进入系统后查看内核:
[root@localhost ~]# uname -r
2.6.36
如果想去掉该信息,可以进行下面配置
root@localhost]cp /boot/initrd-2.6.36.img /tmp
[root@localhost]cd /tmp/
[root@localhost tmp]mkdir newinitrd
[root@localhost tmp]cd newinitrd/
[root@localhost newinitrd]zcat ../initrd-2.6.36.img |cpio -i
[root@localhost newinitrd]vi init 删掉重复的如下两行:
echo “Loading dm-region-hash.ko module”
insmod /lib/dm-region-hash.ko
[root@localhost newinitrd]# find .|cpio -c -o > ../initrd
11277 blocks
[root@localhost newinitrd]# cd ..
[root@localhost tmp]# gzip -9 < initrd > initrd-2.6.36.img
[root@localhost tmp]# ls
initrd initrd-2.6.36.img initrd.img newinitrd
[root@localhost tmp]# mv /boot/initrd-2.6.36.img /boot/initrd-2.6.36.img.bak
[root@localhost tmp]# cp initrd-2.6.36.img /boot/
[root@localhost tmp]# reboot
文章评论