BusiRocket

Article

Fixing the kernel problem when updating CloudLinux

Published on

I am writing this post as self-documentation.

After updating CloudLinux, several things in CPanel stopped working, including the websites, because some PHP modules were not being loaded.

Because I am using CloudLinux PHP, when I tried to access it I saw the following error:

Reboot your system to update the kernel.

But I had already updated several times, so I started looking into why it was not working properly.

The first thing the official documentation told you to do was run the command

modprobe kmodlve

And an error similar to this appeared (I could not copy it exactly)

Module kmodlve not found in /lib/modules/4.18.0-425.19.2.lve.el8.x86_64+debug

That is when I realised the word debug appeared in the kernel

Nothing appeared if you ran the following command either:

lsmod | grep lve

So, in short, the problem was that when the kernel was updated, CloudLinux had enabled a debug kernel, which does not include all modules because these kernels usually include only the essentials needed to troubleshoot errors. As a result, the kmodlve module and many modules later needed in CPanel were not being loaded.

When listing the available kernels in GRUB using the command:

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

Only the following appeared:

0 =  System setup

In principle, the solution was to remove the debug kernel and leave the normal ones, but when we tried to delete it we saw the following message:

# El comando $(uname -r) muestra la versión del kernel actual, cámbiala si necesitas eliminar otra versión
yum remove kernel-debug-core-$(uname -r)

The operation would result in removing the following protected packages: kernel-debug-core

Because it was the kernel we had booted into, it would not let us remove it. The solution was:

  1. Connect to the server through remote VNC so we could see the screen while it restarted
  2. Start the system with a normal kernel
  3. Run the previous command to remove the debug kernel so it is removed from GRUB
  4. Restart again so everything is fixed and confirm that the server boots with the normal kernel by default

 

I hope this helps if you ever find yourself in this situation, and here are some links that may be useful:

Next step

Does this problem sound like yours?

Tell us about it and we will say how we would approach it, in what order and at what cost.