Changing the Default Kernel
Use grubby to set the default kernel that GRUB2 boots into after a timeout period is reached when displaying the GRUB2 boot menu.
You might change the default kernel from RHCK to UEK, from UEK to RHCK, or to switch to a specific kernel version.
You can follow one of two options to set the default kernel in GRUB 2, by using the
grubby
command, choose either of the following:
Example 5-1 Switch to the Most Recent Available RHCK or UEK Kernel
By using the naming convention to identify UEK kernels and RHCK kernels that are available
in the /boot
directory, you can easily switch the default kernel to use
the most recent version of either kernel type.
-
To switch to the most recent version of UEK on the system, run:
sudo grubby --set-default $(ls /boot/vmlinuz-* | grep 'uek' | sort -V | tail -1)
-
To switch to the most recent version of RHCK on the system, run:
sudo grubby --set-default $(ls /boot/vmlinuz-* | grep -v 'uek' | sort -V | tail -1)
Reboot the system after setting the default kernel to switch to that kernel type.