CentOS Linux 升级内核步骤和方法
2014-11-17 14:13
483 查看
转载地址http://blog.chinaunix.net/uid-26565142-id-3171740.html
CentOS Linux 升级内核步骤和方法
1、查看当前系统内核
# uname -r
2.6.32-71.e16.i686
2、下载linux-3.2.14内核包
# tar xvf linux-3.2.14.tar.bz2
# cd linux-3.2.14
3、配置内核并安装
#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 #安装
4、vim /etc/grub.conf,将 default=1 改为 default=0
[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/sdadefault=0timeout=3splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitle
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.imgtitle
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
5、重启系统,并查看内核
# reboot
# uname -r
3.2.14-rt24
6、问题及解决办法
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
CentOS Linux 升级内核步骤和方法
1、查看当前系统内核
# uname -r
2.6.32-71.e16.i686
2、下载linux-3.2.14内核包
# tar xvf linux-3.2.14.tar.bz2
# cd linux-3.2.14
3、配置内核并安装
#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 #安装
4、vim /etc/grub.conf,将 default=1 改为 default=0
[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/sdadefault=0timeout=3splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitle
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.imgtitle
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
5、重启系统,并查看内核
# reboot
# uname -r
3.2.14-rt24
6、问题及解决办法
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
相关文章推荐
- CentOS Linux 升级内核步骤、方法
- CentOS Linux 升级内核步骤和方法
- CentOS Linux 升级内核步骤和方法
- CentOS Linux 升级内核步骤、方法
- CentOS Linux 升级内核步骤和方法
- CentOS Linux 使用yum update更新时不升级内核的方法
- CentOS6.4 升级内核3.4.56步骤和方法
- CentOS 6.0 升级内核步骤、方法
- Linux 升级内核步骤和方法
- Linux内核升级方法与步骤
- CentOS Linux 升级内核步骤、方法
- CentOS Linux 升级内核步骤、方法
- centos linux上面升级内核 进行内核调试的方法
- CentOS Linux 升级内核步骤和方法
- 【实用方法】CentOS Linux 升级内核
- CentOS Linux 升级内核步骤和方法
- 升级Linux内核的一般步骤方法
- 升级Linux内核的一般步骤方法
- CentOS Linux 升级内核步骤、方法
- CentOS Linux 升级内核步骤和方法