CentOS Linux 升級內核步驟和方法

CentOS Linux 升級內核步驟和方法 linux

一、查看當前系統內核 vim

# uname -r
2.6.32-71.e16.i686

二、下載linux-3.2.14內核包 centos

# tar xvf linux-3.2.14.tar.bz2
# cd linux-3.2.14

三、配置內核並安裝 ui

#make mrproper #清除環境變量,即清除配置文件
#cp /boot/config-2.6.32-71.el6.i686 .config
#make menuconfig #在菜單模式下選擇須要編譯的內核模塊 #
#make clean #確保全部東西均保持最新狀態.
#make bzImage #生成內核文件
#make modules #編譯模塊
#make modules_install #安裝模塊
#make install #安裝

四、vim /etc/grub.conf,將 default=1 改成 default=0 this

[root@centos linux-3.2.14]# cat /etc/grub.conf # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/sda3 # initrd /initrd-[generic-]version.img #boot=/dev/sda default=0 timeout=3 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS Linux (3.2.14-rt24) root (hd0,0) kernel /vmlinuz-3.2.14-rt24 ro root=UUID=ab9d2166-3d58-4c30-84ed-d6d1be1e102e rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet initrd /initramfs-3.2.14-rt24.img title centos (2.6.32-71.el6.i686) root (hd0,0) kernel /vmlinuz-2.6.32-71.el6.i686 ro root=UUID=ab9d2166-3d58-4c30-84ed-d6d1be1e102e rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet initrd /initramfs-2.6.32-71.el6.i686.img

五、重啓系統,並查看內核 spa

# reboot
# uname -r
3.2.14-rt24
六、問題及解決辦法
HOSTCC scripts/basic/fixdepHOSTCC 
scripts/kconfig/conf.o
*** Unable to find the ncurses libraries or the*** required header files.*** 'make menuconfig' requires the ncurses libraries.****** Install ncurses (ncurses-devel) and try again.***make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1make: *** [menuconfig] Error 2若是出現上面的錯誤,記得要安裝ncurses-devel,若是你設置了本地源的話,就很簡單了。
# yum install ncurses-devel
相關文章
相關標籤/搜索