好景不長,筆記本升級失敗,今天打開虛擬機也出錯了,費解。都出現以下錯誤。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