Set a kernel as default
To set a specific kernel as the default, use the grubby command-line tool and GRUB configuration.
Procedure
-
Setting the kernel as default by using the
grubbytool.- Enter the following command to set the kernel as default using the
grubbytool:# grubby --set-default $kernel_path
- Enter the following command to set the kernel as default using the
-
Setting the kernel as default by using the
versionargument.- List the boot entries using the kernel keyword and then set an intended kernel as default:
# select k in /boot/vmlinuz-*; do grubby --set-default=$k; break; doneNote To list the boot entries using the
titleargument, enter# grubby --info=ALL | grep title.
- List the boot entries using the kernel keyword and then set an intended kernel as default:
-
Setting the default kernel for only the next boot.
- Enter the following command to set the default kernel for only the next reboot using the
grub2-rebootcommand:# grub2-reboot <index|title|id>Warning Set the default kernel for only the next boot with care. Installing new kernel RPMs, self-built kernels, and manually adding the entries to the
/boot/loader/entries/directory might change the index values.
- Enter the following command to set the default kernel for only the next reboot using the