In this article, we have explained how to select the correct Kernel to boot on CloudLinux OS. There are many instances where you need to manually shift the server to boot using a different kernel, for example, transitioning from the CentOS kernel to a CloudLinux kernel.
Follow the steps:
- View Available Kernels
- Run the following command to list all kernels available in the GRUB boot menu:
awk -F\’ ‘$1 == “menuentry ” {print i++ “ = ” $2}’ /etc/grub2.cfg
- You will see output similar to:
0 = CloudLinux (3.10.0-962.3.2.lve1.5.54.el7.x86_64) 7.9 (Boris Yegorov)
1 = CloudLinux (3.10.0-962.3.2.lve1.5.52.el7.x86_64) 7.9 (Boris Yegorov)
2 = CentOS Linux (3.10.0-1160.21.1.el7.x86_64) 7 (Core)
Notes:- Your output may differ depending on the kernels installed.
- CloudLinux kernels include the word lve in their names.
- Kernel entries are indexed starting from 0.
- Set the Default Kernel to Boot
- Choose the desired kernel index number from the list above (e.g., 0 for the first CloudLinux kernel), and run:
grub2-set-default 0
- Replace 0 with the appropriate number for the kernel you wish to boot.
- To boot into the CloudLinux kernel, ensure you select the one with ‘lve’ in the name.
- Choose the desired kernel index number from the list above (e.g., 0 for the first CloudLinux kernel), and run:
- Verify the Selected Kernel
- To confirm the default kernel that will be used on the next boot, run:
grub2-editenv list
- Expected output:
saved_entry=0
- This confirms that the kernel at position 0 in the GRUB list is set to boot.
- To confirm the default kernel that will be used on the next boot, run:
- Run the following command to list all kernels available in the GRUB boot menu:
This way, selecting the correct kernel guarantees optimal performance and access to CloudLinux-specific features. Always select a kernel with ‘lve’ in its name and verify it using GRUB tools.
Need to track user activity on CloudLinux? Learn How to view the history of a user in CloudLinux