Home  >  Q&A  >  body text

linux-kernel - centos6.4内核升级少模块问题

参考这篇文章进行内核升级
/a/1190000000733628

最后报
[root@puppetnode02 linux-3.10.84]# make install
sh /data/soft/linux-3.10.84/arch/x86/boot/install.sh 3.10.84 arch/x86/boot/bzImage \
System.map "/boot"
ERROR: modinfo: could not find module ipt_MASQUERADE
ERROR: modinfo: could not find module ipt_REDIRECT
ERROR: modinfo: could not find module iptable_nat
ERROR: modinfo: could not find module nf_nat

这少模块问题怎么处理

貌似直接查找都是有的

[root@puppetnode02 linux-3.10.84]#  lsmod | grep ipt_MASQUERADE
ipt_MASQUERADE          2466  1 
nf_nat                 22759  3 ipt_MASQUERADE,ipt_REDIRECT,iptable_nat
nf_conntrack           79357  4 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4
[root@puppetnode02 linux-3.10.84]#  lsmod | grep ipt_REDIRECT
ipt_REDIRECT            1840  1 
nf_nat                 22759  3 ipt_MASQUERADE,ipt_REDIRECT,iptable_nat
[root@puppetnode02 linux-3.10.84]#  lsmod | grep iptable_nat
iptable_nat             6158  1 
nf_nat                 22759  3 ipt_MASQUERADE,ipt_REDIRECT,iptable_nat
nf_conntrack_ipv4       9506  3 iptable_nat,nf_nat
nf_conntrack           79357  4 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4
ip_tables              17831  2 iptable_nat,iptable_filter
[root@puppetnode02 linux-3.10.84]#  lsmod | grep nf_nat
nf_nat                 22759  3 ipt_MASQUERADE,ipt_REDIRECT,iptable_nat
nf_conntrack_ipv4       9506  3 iptable_nat,nf_nat
nf_conntrack           79357  4 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4

但不知道后面怎么处理

迷茫迷茫2733 days ago880

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-04-25 09:04:50

    Upgraded directly using yum.
    1. View the original kernel information

    [root@localhost ~]# cat /proc/version 
    Linux version 2.6.32-220.el6.x86_64 (mockbuild@c6b18n3.bsys.dev.centos.org) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Tue Dec 6 19:48:22 GMT 2011
    

    2. Import public key

    [root@localhost ~]# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
    [root@localhost ~]# ll /etc/yum.repos.d/
    总用量 12
    -rw-r--r--. 1 root root 1926 12月  9 2011 CentOS-Base.repo
    -rw-r--r--. 1 root root  637 12月  9 2011 CentOS-Debuginfo.repo
    -rw-r--r--. 1 root root  626 12月  9 2011 CentOS-Media.repo
    [root@localhost ~]# rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
    Retrieving http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
    Preparing...                ########################################### [100%]
       1:elrepo-release         ########################################### [100%]
    [root@localhost ~]# ll /etc/yum.repos.d/
    总用量 16
    -rw-r--r--. 1 root root 1926 12月  9 2011 CentOS-Base.repo
    -rw-r--r--. 1 root root  637 12月  9 2011 CentOS-Debuginfo.repo
    -rw-r--r--. 1 root root  626 12月  9 2011 CentOS-Media.repo
    -rw-r--r--. 1 root root 2150  2月 10 2014 elrepo.repo
    

    3. Because Docker recommends using kernel 3.8 or above, we choose to use YUM to upgrade the kernel.
    Import KEY and install the software source. In YUM's ELRepo source, there are two kernel versions: mainline (3.13.1) and long-term (3.10.28). Considering that long-term is more stable and will be updated for a long time, this version is selected.
    Main:
    When using yum, bring the --enablerepo=elrepo-kernel parameter
    [root@localhost ~]# yum --enablerepo=elrepo-kernel install kernel-lt

    4. Modify grub order
    Modify the default startup kernel. The newly installed kernel is usually the first one. Just change default = 1 to default = 0 here.
    [root@localhost ~]# 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/sda2
    # initrd /initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (3.10.84-1.el6.elrepo.x86_64)
    root (hd0,0)
    kernel /vmlinuz-3.10.84-1.el6.elrepo.x86_64 ro root=UUID=7ab2f0a8-b4b1-40bd-80b3-2c6f22486ded rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD quiet rhgb crashkernel=auto LANG=zh_CN.UTF-8 rd _NO_LVM rd_NO_DM
    initrd /initramfs-3.10.84-1.el6.elrepo.x86_64.img
    title CentOS (2.6.32-220.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=7ab2f0a8-b4b1-40bd-80b3-2c6f22486ded rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us rd_NO_MD quiet rhgb crashkernel=auto LANG=zh_CN.UTF-8 rd_NO_ LVM rd_NO_DM
    initrd /initramfs-2.6.32-220.el6.x86_64.img

    5. Restart the machine to view kernel information

    [root@localhost ~]# uname -a
    Linux localhost.localdomain 3.10.84-1.el6.elrepo.x86_64 #1 SMP Sat Jul 11 11:33:48 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
    

    Kernel upgrade completed

    reply
    0
  • Cancelreply