好景不长,笔记本升级失败,今天打开虚拟机也出错了,费解。都出现以下错误。html
【基于 Centos 5.7 i386 虚拟512内存】linux
内核升级,简洁版,亲测成功,网上有不少文章了。就不详细描述了。sql
上http://www.kernel.org/选择一个稳定版ubuntu
#安装依赖包vim
- #yum install gcc ncurses-devel
- #tar -zxf linux-2.6.33.20.tar.gz -C /usr/src/
- #cd /usr/src/linux-2.6.33.20
#去除内核的依赖关系以及编译后的垃圾信息ide
- #make mrproper
#拷贝/boot/config-2.6.18-274.el5 为/usr/src/linux-2.6.33.20/.config spa
- #cp /boot/config-2.6.18-274.el5 .config
#进入菜单方式界面配置内核
xml
- # make menuconfig
#选中倒数第二项,自动加载刚才拷贝的文件.confightm
选中OK以后继续配置,点开每项以后又详细的,好比选择ext4 支持等。注意:须要勾选上General Setup下面的“enable deprecated sysfs features to support old userspace tools”,否则编译安装以后会找不到原来的挂载点。[参考] blog
#而后编译内核、编译模块、安装模块、安装内核,注意是在linux-2.6.33.20/
#这步编译有点久,虚拟机用了接近一个小时。
- #make
- #make modules && make modules_install && make install
#完成以后,会提示成功。查看grub.cnf 已经添加了,把default=0 设为0,重启,默认加载新内核。不修改的话,仍是加载旧内核。
- #vim /boot/grub/grub.conf
- #boot=/dev/sda
- default=0
- timeout=5
- splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz
- hiddenmenu
- title CentOS (2.6.33.20)
- root (hd0,0)
- kernel /vmlinuz-2.6.33.20 ro root=/dev/VolGroup00/LogVol00
- initrd /initrd-2.6.33.20.img
- title CentOS (2.6.18-274.el5)
- root (hd0,0)
- kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/VolGroup00/LogVol00
- initrd /initrd-2.6.18-274.el5.img
重启系统,亲测成功
参考: http://www.liusuping.com/ubuntu-linux/redhat-linux-kernel-update.html
http://xugang.blog.51cto.com/400032/95621