题记:今天装docker,提示我最好用3.10以上的内核
一.环境
1.1 系统环境
[[email protected] kernels]# lsb lsblk lsb_release [[email protected] kernels]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.5 (Final) Release: 6.5 Codename: Final
1.2 当前内核版本
Display all 259 possibilities? (y or n) [[email protected] kernels]# more /proc/version Linux version 2.6.32-431.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013
二.安装
2.1 获取高版本内核,并解压到/usr/src/kernels
cd /root/soft wget cd /usr/src/kernels tar -xJvf /root/soft/linux-3.10.87.tar.xz
2.2 编译&安装
A:进入内核目录,执行make menuconfig 修改编译配置文件
[[email protected] kernels]# cd linux-3.10.87/ [[email protected] linux-3.10.87]# pwd /usr/src/kernels/linux-3.10.87 [[email protected] linux-3.10.87]# make menuconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/mconf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/mconf scripts/kconfig/mconf Kconfig # # using defaults found in /boot/config-2.6.32-431.el6.x86_64 # /boot/config-2.6.32-431.el6.x86_64:497:warning: symbol value ‘m‘ invalid for X86_INTEL_PSTATE /boot/config-2.6.32-431.el6.x86_64:565:warning: symbol value ‘m‘ invalid for PCCARD_NONSTATIC /boot/config-2.6.32-431.el6.x86_64:2730:warning: symbol value ‘m‘ invalid for MFD_WM8400 /boot/config-2.6.32-431.el6.x86_64:2731:warning: symbol value ‘m‘ invalid for MFD_WM831X /boot/config-2.6.32-431.el6.x86_64:2732:warning: symbol value ‘m‘ invalid for MFD_WM8350 /boot/config-2.6.32-431.el6.x86_64:2745:warning: symbol value ‘m‘ invalid for MFD_WM8350_I2C /boot/config-2.6.32-431.el6.x86_64:2747:warning: symbol value ‘m‘ invalid for AB3100_COR
注意:此处我的系统是64位,所以要选用64-bit kernel
然后保存,检查配置文件 .config
[[email protected] linux-3.10.87]# ls -al 总用量 684 drwxrwxr-x 23 root root 4096 8月 20 14:39 . drwxr-xr-x. 4 www root 4096 8月 20 14:16 .. drwxrwxr-x 32 root root 4096 8月 17 11:52 arch drwxrwxr-x 3 root root 4096 8月 17 11:52 block -rw-r----- 1 root root 119834 8月 20 14:39 .config -rw-rw-r-- 1 root root 18693 8月 17 11:52 COPYING -rw-rw-r-- 1 root root 95317 8月 17 11:52 CREDITS drwxrwxr-x 4 root root 4096 8月
B:编译 make all 这一步 执行的时间很长,我这边有一个小时左右
[[email protected] linux-3.10.87]# pwd /usr/src/kernels/linux-3.10.87 [[email protected] linux-3.10.87]# make all
C: 安装模块
[[email protected] linux-3.10.87]# make modules_install
D:执行make install
[[email protected] linux-3.10.87]# make install sh /usr/src/kernels/linux-3.10.87/arch/x86/boot/install.sh 3.10.87 arch/x86/boot/bzImage System.map "/boot" ERROR: modinfo: could not find module xt_MARK ERROR: modinfo: could not find module ipt_MASQUERADE ERROR: modinfo: could not find module iptable_nat ERROR: modinfo: could not find module nf_nat ERROR: modinfo: could not find module vmhgfs ERROR: modinfo: could not find module vsock ERROR: modinfo: could not find module vmware_balloon ERROR: modinfo: could not find module vmci [[email protected] linux-3.10.87]#
报错了
暂时未解决
参考文章:http://blog.itpub.net/27771627/viewspace-1256552
http://smilejay.com/2013/11/kernel-install-error-could-not-find-module/
时间: 2024-10-20 12:38:43