Chapter 2. Specifying the RHEL kernel to run
You can boot any installed kernel, standard or Real Time by selecting the required kernel manually in the GRUB menu during booting. You can also configure the kernel to boot by default.
When the RHEL for Real Time kernel is installed, it is automatically set to be the default kernel and is used on the next boot.
2.1. Displaying the default kernel Copy linkLink copied to clipboard!
You can display the kernel configured to boot by default.
Procedure
To view the default kernel:
# grubby --default-kernel /boot/vmlinuz-6.12.0-89.el10_0.x86_64+rtThe
+rtin the output of the command shows that the default kernel is a real time kernel.
2.2. Displaying the running kernel Copy linkLink copied to clipboard!
You can display the currently running kernel to verify which kernel version is active on your system.
Procedure
To show which kernel the system is currently running.
# uname -a Linux rt-server.example.com 6.12.0-89.el10_0.x86_64 …NoteWhen the system receives a minor update, for example, from 8.3 to 8.4, the default kernel might automatically change from the Real Time kernel back to the standard kernel.
2.3. Configuring kernel-rt as the default boot kernel Copy linkLink copied to clipboard!
On a newly installed system, the stock RHEL kernel is set as the default boot kernel. You can change this configuration to set kernel-rt as the default kernel and make this configuration persistent across system updates. This is a one-time procedure that you can change or revert if necessary. You can also configure other kernel variants, such as kernel, kernel-debug, or kernel-rt-debug, as the default boot kernel.
Procedure
To configure
kernel-rtas the default boot kernel, enter the following command:# grubby --set-default=<RT_VMLINUZ>RT_VMLINUZis the name of thevmlinuxfile that is associated with thekernel-rtkernel. For example:# grubby --set-default=/boot/vmlinuz-6.12.0-284.11.1.rt14.296.el0_0_2.x86_64+rtTo configure
kernel-rtas default boot kernel on system updates, enter the following command:# sed -i 's/UPDATEDEFAULT=.*/UPDATEDEFAULT=yes/g' /etc/sysconfig/kernel # sed -i 's/DEFAULTKERNEL=.*/DEFAULTKERNEL=kernel-rt-core/g' /etc/sysconfig/kernelThe
UPDATEDEFAULTvariable when specified asyes, sets the default kernel to change with system updates.In the example output, the path for the default kernel is specific to the
kernel-rt-corepackage installed. You can determine the path to the kernel from a package by using therpm -q kernel-rt-corecommand.Optional: If you need to determine the path to the kernel from a package, first list the installed packages:
# rpm -q kernel-rt-core kernel-rt-core-6.12.0-55.14.1.el10_0.x86_64 kernel-rt-core-6.12.0-55.13.1.el10_0.x86_64 kernel-rt-core-6.12.0-55.12.1.el10_0.x86_64To use the latest installed package as the default, enter the following command to find the path to the boot image from the package:
# rpm -ql kernel-rt-core-6.12.0-55.14.1.el10_0.x86_64 | grep '^/boot/vmlinu' /boot/vmlinuz-6.12.0-55.14.1.el10_0.x86_64+rtTo configure
kernel-rtas the default boot kernel, enter the following command:# grubby --set-default=/boot/vmlinuz-6.12.0-55.14.1.el10_0.x86_64+rt
Verification
To verify
kernel-rtis the default kernel, enter the following command:# grubby --default-kernel /boot/vmlinuz-6.12.0-55.14.1.el10_0.x86_64+rt