WHM v68.0.16 - You must reboot the server to apply kernel updates

sadasan

Active Member
Feb 10, 2015
34
2
8
cPanel Access Level
Root Administrator
Hello,

WHM v68.0.16 plus KernelCare

I am still seeing the warning message of "You must reboot the server to apply kernel updates" at the right top portion of WHM.

When is this issue fixed?
Any advice would be appreciated.
cPanel_reboot.jpg
Thanks.
 
Last edited by a moderator:

JawadArshad

Well-Known Member
PartnerNOC
Apr 8, 2008
459
6
68
PK
cPanel Access Level
DataCenter Provider
Hello,
I have the same problem. I forced the reinstallation of the Cpanel and even then it did not help.

Do you have any ideas?
Hello,

WHM v68.0.16 plus KernelCare

I am still seeing the warning message of "You must reboot the server to apply kernel updates" at the right top portion of WHM.

When is this issue fixed?
Any advice would be appreciated.
View attachment 49619
Thanks.
Have you looked at /etc/grub.conf to see if the latest kernel version is set as the default value. Sometimes you don't just need to reboot the server, but edit grub.conf manually to make sure latest kernel is set as default and then reboot.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Hello,

The image provided shows "Software Updates". Can you let us know the output from the command below?

Code:
whmapi1 system_needs_reboot
Thank you.
 

Greg M

Active Member
May 26, 2016
36
12
8
Glasgow, Scotland
cPanel Access Level
Root Administrator
Hi there,

I recently had a similar issue to this, I don't use Kernel care (Although did consider it at the time and tested on a separate machine) the problem is usually that there is a kernel update that was downloaded by your server. with kernel care, it seems to be if you have installed kernel care after the new kernel is downloaded - but not activated, this means kernel care patches your current kernel while the new one remains untouched - reinstalling cPanel won't change this as the Kernel is generally updated by YUM and is not a WHM process. So while it is safe for kernel care to patch your "old" kernel. You will still have the new one in the list and your server will still think its the latest and most up to date one.

Kernel care would then patch your current loaded kernel - this means that your server / WHM will still detect the newer kernel in the kernel list and basically wants to use it. Even though your "old" kernel is fully patched by kernel care

Generally what you need to do is to edit your grub conf and select your current loaded kernel as the boot kernel. This should then remove the message as WHM and your server won't detect a kernel version mismatch.


In my case, my kernel updated and I rebooted (without kernel care) the new kernel crashed the system and stuck my Dedicated server into its emergency mode. Tech guy at the DC booted to the previous kernel for me and I then had to update the grub conf to the previous kernel HOWEVER, After a reboot (I wanted to test that it was sorted) the reboot message reappeared, I noticed that the Kernel that was booted had changed its ID number, I had set it as 2 as the rescue/emergency mode was 0. This meant after the reboot, 0 became the "new" kernel which doesn't work and 1 became my stable one. So I had to change the grub conf again to book kernel ID 1. Basically, the server did boot the correct kernel but that same kernels Id the changed from 2 to 1 (I'm assuming after a succesfull reboot).



Anyway I hope this helps shed light for those experiencing this issue.

The following commands can be used to find and set the correct kernel, on the last one change '1' to your desired kernel from the awk command



# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg

# uname -r

# grub2-editenv list


# grub2-set-default 1


this article explains deeper

HowTos/Grub2 - CentOS Wiki