If you’re running cPanel on a CentOS or CloudLinux server, you might have noticed that it installs a hardened kernel by default when KernelCare or related security tools are enabled. While this adds an extra layer of protection, there are times when system administrators may prefer to replace the hardened kernel with a standard one — especially during troubleshooting, updates, or compatibility concerns with certain software or modules.

In this guide by Hostrago, we’ll walk you through the steps to replace the hardened kernel of cPanel with a standard kernel safely and effectively. We’ll also touch on why you might want to make the switch, and precautions to keep your server stable.

Why Replace the Hardened Kernel?

Before diving into the technical steps, let’s understand why you might need to switch from a hardened kernel to a standard one:

  • Compatibility Issues: Some modules or software may not function properly under a hardened kernel.
  • Kernel Panic or Crashes: In rare cases, hardened kernels may trigger system instability.
  • Custom Kernel Requirements: You may need specific kernel builds for performance tuning or hardware support.
  • Troubleshooting Needs: Diagnosing certain low-level issues is easier with the standard kernel.

Steps to Replace the Hardened Kernel in cPanel

Follow these steps carefully to replace your existing hardened kernel with the standard kernel:

Step 1: Verify the Current Kernel

Before making any changes, it’s important to verify which kernel is currently in use.

uname -r

If the output contains kcare or kernelcare, you’re using a hardened kernel.


Step 2: Disable KernelCare (If Installed)

KernelCare is often responsible for loading a hardened kernel. Disable it first.

kcarectl --unload

Stop it from restarting automatically on boot:

chkconfig kcare on

Or remove it completely:

yum remove kernelcare

Step 3: Install the Standard Kernel

Now, install the standard kernel package for your Linux distribution:

For CentOS 7:

yum install kernel

For AlmaLinux or Rocky Linux:

ashCopyEddnf install kernel

Make sure the standard kernel gets added to GRUB boot entries.


Step 4: Set Standard Kernel as Default in GRUB

After installing the standard kernel, update GRUB and make the new kernel the default:

grub2-set-default 0
grub2-mkconfig -o /boot/grub2/grub.cfg

You can also check the available kernel entries with:

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

Ensure the latest standard kernel is set to boot by default.


Step 5: Reboot Your Server

Now, reboot the server to load the new kernel:bashCopyEditreboot

Once rebooted, verify the active kernel:

uname -r

This should now show the standard kernel version (without any “kcare” reference).

Verifying Kernel Status in WHM

After logging into WHM, go to:

Home » Server Status » Server Information

Here, you can check the current kernel version. Make sure it reflects the standard kernel and no longer includes the hardened version.

Conclusion

Replacing the hardened kernel with a standard kernel in cPanel/WHM is a straightforward but sensitive process. At Hostrago, we always recommend understanding the implications of such changes, especially on production servers. If you’re looking for optimal server performance or troubleshooting issues, the switch to a standard kernel can be the right step.

For more tutorials like this, check out our Knowledge Base or explore our VPS Hosting Plans that offer full root access and kernel control.

Categorized in:

cPanel,