How do I choose which kernel to boot on CloudLinux 7? Print

  • 0

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 command line:

$ grub2-set-default 1

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

$ grub2-editenv list
saved_entry=1

Was this answer helpful?

« Back