1.7. Setting a kernel as default
Set a specific kernel as default by using the grubby command-line tool and GRUB.
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
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; done注意To list the boot entries using the
titleargument, enter# grubby --info=ALL | grep title.
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>警告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.