Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CentOS7 Current kernel version does not match the kernel version for boot

Discussion in 'Security' started by i-Strategi, Nov 29, 2016.

  1. i-Strategi

    i-Strategi Member

    Joined:
    Mar 14, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Denmark
    cPanel Access Level:
    DataCenter Provider
    Hi.

    I have a cPanel server running on CentOS7.
    When i run Security Advisor, i get the following message:
    Current kernel version does not match the kernel version for boot. running kernel: 3.10.0-327.36.3.el7.x86_64, boot kernel:Reboot the system in the "Graceful Server Reboot" area. Check the boot configuration in grub.conf if the new kernel is not loaded after a reboot.

    I have already performed a Graceful Server Reboot a couple of times with no success, i still get the message.

    I have also tried running yum-update but all packages are up to date.

    I noticed that you suggest checking the boot config in grub.conf - but after some Googling, i found out that no such file exists in CentOS7 (renamed and changed location) - im no expert on this area, this is why i need help.
     
    #1 i-Strategi, Nov 29, 2016
    Last edited by a moderator: Nov 29, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify the environment type and cPanel version for this server? You can check with these commands:

    Code:
    cat /var/cpanel/envtype
    cat /usr/local/cpanel/version
    Also, let us know the output from:

    Code:
    rpm -qa|grep kernel
    uname -r
    Thank you.
     
  3. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,488
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    I would like to add some more information to it. The server provider and the OS installed from their build also causes this issue where new kernel installation fails. Just check if the new kernel installation went well and that your grub.conf file has all the kernel listed in it that you are booting from.
     
  4. i-Strategi

    i-Strategi Member

    Joined:
    Mar 14, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Denmark
    cPanel Access Level:
    DataCenter Provider
    Sorry for the late update.

    Code:
    cat /var/cpanel/envtype
    cat /usr/local/cpanel/version
    Returns:
    11.60.0.31

    Code:
    rpm -qa|grep kernel
    Returns:
    kernel-3.10.0-327.el7.x86_64
    kernel-tools-libs-3.10.0-514.2.2.el7.x86_64
    kernel-3.10.0-327.36.3.el7.x86_64
    kernel-tools-3.10.0-514.2.2.el7.x86_64
    kernel-3.10.0-514.2.2.el7.x86_64
    kernel-headers-3.10.0-514.2.2.el7.x86_64


    Code:
    uname -r
    Returns:
    3.10.0-514.2.2.el7.x86_64
     
  5. i-Strategi

    i-Strategi Member

    Joined:
    Mar 14, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Denmark
    cPanel Access Level:
    DataCenter Provider
    The OS is Centos 7

    The server provider is Velia.net . I have other dedicated cPanel servers hosted there, but never encountered this issue before.

    Hope this helps
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  7. i-Strategi

    i-Strategi Member

    Joined:
    Mar 14, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Denmark
    cPanel Access Level:
    DataCenter Provider
    A support ticket has been created.
    The ID is: 8125655
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It looks like it was confirmed to be a false positive. We may have an internal case open to address this issue. Could you confirm if this system uses UEFI? You can check by verifying if the /boot/efi/EFI/centos/grub.cfg file exists:

    Code:
    ls /boot/efi/EFI/centos/grub.cfg
    Thank you.
     
  9. tomidjx

    tomidjx Registered

    Joined:
    Nov 14, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi, I seems to have the same problem, and it keeps coming up every time I do install cpanel/WHM on a Centos server both 6 or 7.

    cat /usr/local/cpanel/version => 11.64.0.36

    rpm -qa|grep kernel =>
    kernel-2.6.32-642.15.1.el6.x86_64
    kernel-2.6.32-696.299.3.2.cp6.x86_64
    dracut-kernel-004-409.el6_8.2.noarch
    kernel-firmware-2.6.32-696.299.3.2.cp6.x86_64
    kernel-2.6.32-642.el6.x86_64
    kernel-headers-2.6.32-696.299.3.2.cp6.x86_64
    kernel-2.6.32-696.6.3.el6.x86_64

    uname -r => 4.9.36-x86_64-linode85

    I've been trying to update kernel to no avail. Any help would be much appreciated.
    Thanks
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @tomidjx,

    Please post the output from the following command:

    Code:
    ls /boot/efi/EFI/centos/grub.cfg
    Thank you.
     
  11. Routes

    Routes Member

    Joined:
    Aug 5, 2016
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Austria
    cPanel Access Level:
    Root Administrator
    Hi,

    this has nothing to do with EFI, there is some other bug you have in there. For some reason you store information anywhere which kernel you expect and this is not handled correctly after a kernel update.
    As I updated from 3.10.0-514.2.2.el7.x86_64 to 3.10.0-514.26.2.el7.x86_64 I also get the message now
    Current kernel version does not match the kernel version for boot. running kernel: 3.10.0-514.26.2.el7.x86_64, boot kernel: 3.10.0-514.2.2.el7.x86_64
    Why do you expect the older ...514.2.2.... kernel to run?

    The 514.26 kernel is running smoothly and everything works like expected but WHM wants a server reboot which will never choose the 514.2.2 kernel as I updated the default to 514.26, so what to do about that? I have NO EFI boot

    [root@ms1 log]# cat /var/cpanel/envtype
    kvm
    [root@ms1 log]# cat /usr/local/cpanel/version
    11.64.0.36
    [root@ms1 log]# rpm -qa | grep kernel
    kernel-tools-3.10.0-514.26.2.el7.x86_64
    kernel-3.10.0-327.el7.x86_64
    kernel-3.10.0-514.2.2.el7.x86_64
    kernel-tools-libs-3.10.0-514.26.2.el7.x86_64
    kernel-3.10.0-514.26.2.el7.x86_64
    kernel-headers-3.10.0-514.26.2.el7.x86_64
    kernel-3.10.0-327.36.3.el7.x86_64

    So the question is where do you store the information which kernel YOU expect? Because this is senseless as I want to run the kernel I want to run...
     
  12. Routes

    Routes Member

    Joined:
    Aug 5, 2016
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Austria
    cPanel Access Level:
    Root Administrator
    For all : Please check with
    grub2-editenv list
    if the actual kernel you want to run is set as default
    if not set the corresponding grub menuentry with grub2-set-default
    this removed the wrong error message for me.
    Somehow cPanel seems to check the running kernel against the default set one and is not updating this information correctly when installing a new kernel, so if you set a default entry on your own in /etc/default/grub without using saved in GRUB_DEFAULT and setting the correct one with grub2-set-default you get an error message
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Internal case CPANEL-14702 is open to address this particular issue. I'll monitor the case and update this thread with more information as it becomes available. In the meantime, the workaround is to manually set the latest kernel version using the "grub2-set-default" command and then run the "/scripts/rpmup" command. EX:

    Code:
    grub2-set-default $kernel-version
    /scripts/rpmup
    Replace "$kernel-version" with the most recent kernel version that you booted the server into.

    Thank you.
     
Loading...

Share This Page