How to fix boot problem because of CLN kernel

Some of our clients contacted us recently about the boot problem of their server after installing CloudLinux and it's the kernel. So, here's we're writing a tutorial to fix the boot problem.

First of all, check the version of the kernel installed on your server:

grubby --default-kernel

If no CLN kernel detected, then install grab2:

yum install grub2 --disableexcludes=all

Then re-install the latest CLN kernel and check the kernel version.

If you've already installed CLN kernel, then, re-install the latest kernel of CLN:

yum reinstall kernel-3.10.0-962.3.2.lve1.5.35.el7.x86_64

Now, try to boot with CloudLinux kernel

CloudLinux 7 brings GRUB2 with the totally new scheme of booting the kernels, the old edit file is not applicable anymore. The correct way to boot needed kernel (use an older kernel, CentOS kernel one or debug kernel) is with grub2-set-default command.

1. Take a needed kernel with :

awk -F\' '$1=="menuentry " {print i++ " =  "$2}' /etc/grub2.cfg
0 =  CloudLinux (3.10.0-427.18.2.lve1.4.27.el7.x86_64) 7.3 (Yury Malyshev)
1 =  CloudLinux (3.10.0-427.36.1.lve1.4.26.el7.x86_64) 7.3 (Yury Malyshev)
2 =  CloudLinux (3.10.0-427.18.2.lve1.4.24.el7.x86_64) 7.2 (Valeri Kubasov)
3 =  CloudLinux (0-rescue-1d7e5b9aa3bd48e99e108700e5458d82) 7.2 (Valeri Kubasov)

Note that the position of a menu entry in the list is denoted by a number starting with zero, so we are numbering it especially in a correct way.

2. Set to boot needed kernel with the command line:

grub2-set-default 1

Use the following command to check currently selected kernel to be booted:

grub2-editenv list

Done! Now reboot your server.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix lveinfo database error of CLN

Run the following command: service lvestats stoptar -zcvf /root/lveinfo_backup_$(date...

How to Install KernelCare on cPanel/WHM server

To install KernelCare, you need to log in with the root user on your cPanel server. Check for...

Switching all cPanel acc/s to "inherit" PHP version

You can change all cPanel users to inherit with this CLI command: for each in `cat...

How to fix issues like PHP selector not available

Some of our clients face the issues like "PHP selector not available" on cPanel accounts of their...

CloudLinux installed, but still showing CentOS

Some of our clients face the issue, that's why we're writing the tutorial to fix it. First of...