Install the kernel-rt packages

You can install the real-time kernel packages on Red Hat Enterprise Linux by using dnf, then configure kernel-rt as the default boot kernel and verify the installation with post-installation checks.

Important

On 64-bit ARM (aarch64) systems, the RHEL for Real Time kernel (kernel-rt) is available as a Technology Preview. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

Install the real-time kernel by using dnf

To obtain the real-time kernel, you can install it by using the dnf utility, or you can download it along with other RHEL components from the Download Red Hat Enterprise Linux portal.

Before you begin

  • The latest version of RHEL 10 is installed on an AMD64 or Intel 64 system. The real-time kernel runs on AMD64 and Intel 64 (also known as x86_64) server platforms that are certified to run Red Hat Enterprise Linux.
  • Your machine is registered and RHEL is attached to a RHEL for Real Time subscription.
  • Ensure that the base platform is properly tuned and the system firmware parameters are adjusted. Failure to perform these tasks before installing the real-time kernel might prevent consistent performance from a RHEL for Real Time deployment.

Procedure

  1. Enable the RHEL for Real Time repository.
    # subscription-manager repos --enable rhel-10-for-x86_64-rt-rpms
    Note

    If you are using an Extended Update Support (EUS) subscription, enable the RHEL for Real Time EUS repository instead:

    # subscription-manager repos --enable rhel-10-for-x86_64-rt-eus-rpms

    For more information about EUS, see Red Hat Enterprise Linux Life Cycle.

  2. Install the RHEL for Real Time package group.
    # dnf groupinstall RT

    This group installs several packages:

    • kernel-rt includes meta-package that carries the list of package dependencies to have a functional kernel-rt installed.
    • kernel-rt-core includes the core RHEL for Real Time kernel package.
    • kernel-rt-devel includes the proper kernel binary, compiled with PREEMPT_RT enabled, the package also contains configuration and scripts to drive the kernel installation.
    • kernel-rt-modules-core includes the essential kernel modules required for a functional kernel. kernel-rt-modules provides commonly used kernel modules, a complement to kernel-modules-core.
    • kernel-rt-modules-extra includes the RHEL for Real Time kernel extra modules package.
    • realtime-setup sets up the basic environment required by RHEL for Real Time.
    • rteval evaluates system suitability for RHEL for Real Time.
    • rteval-loads provides source code for rteval loads.
    • tuned-profiles-realtime includes the additional TuneD profiles targeted to real-time.
  3. Optional: The tuna package contains a tool that helps tune the real-time kernel workload. It automates CPU isolation and thread affinity operations from the command line or the GUI. This package is available in the base RHEL 10 repository.
    # dnf install tuna
    Note

    When the RHEL for Real Time kernel is installed, it automatically becomes the default kernel. The system uses this kernel on the next boot. You can also configure other existing kernels variants, such as, kernel, kernel-debug, or kernel-rt-debug as the default boot kernel. For more information, see Configuring kernel-rt as the default boot kernel.

Results

  • Check the installation location and verify that the components have been installed successfully.
    # rpm -ql realtime-setup
    /etc/security/limits.d/realtime.conf
    /etc/sysconfig/realtime-setup
    /etc/udev/rules.d/99-rhel-rt.rules
    /usr/bin/realtime-setup
    /usr/bin/rt-setup-kdump
    /usr/bin/slub_cpu_partial_off
    /usr/lib/.build-id
    /usr/lib/.build-id/a4
    /usr/lib/.build-id/a4/da77908aa4c6f048939f3267f1c552c456d117
    /usr/lib/systemd/system/rt-entsk.service
    /usr/lib/systemd/system/rt-setup.service
    /usr/sbin/kernel-is-rt
    /usr/sbin/rt-entsk

Install RHEL for Real Time from a local repository

If your system does not have network access to Red Hat Content Delivery Network (CDN), you can install the RHEL for Real Time kernel from a local repository by using the RHEL Binary DVD ISO image as the package source. This method is suitable for disconnected or bandwidth-constrained environments.

Before you begin

  • The latest version of RHEL 10 is installed on a 64-bit x86 system.
  • You have downloaded the RHEL 10 Binary DVD ISO image that contains the kernel-rt packages from the Download Red Hat Enterprise Linux portal.
  • The ISO image is accessible on the local file system or removable media.

About this task

Important

Booting from a RHEL for Real Time ISO performs a full operating system installation. To add the real-time kernel to an existing RHEL system without reinstalling, use the local repository method described in this procedure.

Procedure

  1. Create a mount point for the ISO image:
    # mkdir -p /mnt/rhel-iso
  2. Mount the ISO image on the mount point:
    # mount -o loop,ro /path/to/rhel-10-x86_64-dvd.iso /mnt/rhel-iso

    Replace /path/to/rhel-10-x86_64-dvd.iso with the actual path to your ISO file.

  3. Create a repository configuration file that points to the mounted ISO:
    # cat > /etc/yum.repos.d/rhel-local.repo << 'EOF'
    [rhel-local-baseos]
    name=RHEL 10 Local BaseOS
    baseurl=file:///mnt/rhel-iso/BaseOS
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [rhel-local-appstream]
    name=RHEL 10 Local AppStream
    baseurl=file:///mnt/rhel-iso/AppStream
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    [rhel-local-rt]
    name=RHEL 10 Local RT
    baseurl=file:///mnt/rhel-iso/RT
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    EOF
    Note

    The directory names within the ISO (BaseOS, AppStream, RT) depend on the specific ISO variant you downloaded. Verify the directory structure of your mounted ISO and adjust the baseurl paths accordingly.

  4. Clear the dnf cache to pick up the new repositories:
    # dnf clean all
  5. Verify that the RT repository is available:
    # dnf repolist

    The output lists rhel-local-rt among the enabled repositories.

  6. Install the RHEL for Real Time package group:
    # dnf groupinstall RT
  7. Optional: After the installation completes, unmount the ISO:
    # umount /mnt/rhel-iso

    If you plan to install additional packages from the ISO in the future, keep it mounted or add an entry to /etc/fstab to mount it persistently:

    /path/to/rhel-10-x86_64-dvd.iso  /mnt/rhel-iso  iso9660  loop,ro  0 0
  8. Reboot the system to use the real-time kernel:
    # reboot

Results

  1. After reboot, verify that the real-time kernel is running:
    # uname -r

    The output contains rt in the kernel version string, for example 6.12.0-55.9.1.el10_0.x86_64+rt.

  2. Verify that the RT packages are installed:
    # rpm -qa | grep kernel-rt

Post-installation checklist

After you install the real-time kernel, perform system tuning with the provided tuned profiles. Configure kdump for crash dump information and verify that the Real Time kernel is the default kernel.

After installing the real-time kernel, ensure the following:

  • To achieve optimal low-latency determinism, perform RHEL for Real Time specific system tuning by using the provided tuned profiles. Use these profiles as the final tuning or as the baseline for your specific tuning requirements.
  • Review the module compatibility information for the real-time kernel and the standard kernel.
  • To enable kdump, configure RHEL for Real Time to provide crash dump information by enabling kexec/kdump.
  • Verify that the Real Time kernel is the default kernel.

Module compatibility of the real-time kernel and the standard kernel

Kernel modules are inherently specific to the kernel they are built for. RHEL for Real Time and RHEL share a common code base. However, RHEL for Real Time has the real-time features and capabilities enabled. As a consequence, modules must be rebuilt to be used with RHEL for Real Time.

If you must use a third-party module, recompile it with the RHEL for Real Time header files. These files are available in the RHEL for Real Time development and test packages.

The following third-party drivers for standard Red Hat Enterprise Linux 10 do not currently have a RHEL for Real Time build:

  • EMC Powerpath
  • NVIDIA graphics
  • Advanced storage adapter configuration utilities from Qlogic

User-space tools built for Red Hat Enterprise Linux 10 for the stock kernel are fully compatible with RHEL for Real Time. Some applications might not fully benefit from real-time optimizations due to their design. These applications might behave differently than expected.

Additional resources

Display the default boot kernel

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+rt

The +rt in the output of the command shows that the default kernel is a real time kernel.

Display the running kernel

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-124.15.1.el10_1.x86_64 …

To learn what the kernel version string means, see Understanding RHEL kernel version numbers.

Note

When the system receives a minor update, for example from 10.1 to 10.2, the default kernel might change. The system might revert to the standard kernel instead of the Real Time kernel.

Set kernel-rt as the default boot kernel

On a newly installed system, the stock RHEL kernel is set as the default boot kernel. You can change this to set kernel-rt as the default kernel and make it persistent across system updates. This is a one-time procedure that you can change or revert if necessary.

Procedure

  1. To configure kernel-rt as the default boot kernel, enter the following command:
    # grubby --set-default=<RT_VMLINUZ>

    RT_VMLINUZ is the name of the vmlinux file that is associated with the kernel-rt kernel. For example:

    # grubby --set-default=/boot/vmlinuz-6.12.0-284.11.1.rt14.296.el0_0_2.x86_64+rt
  2. To configure kernel-rt as 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/kernel

    The UPDATEDEFAULT variable when specified as yes, 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-core package installed. You can determine the path to the kernel from a package by using the rpm -q kernel-rt-core command.

    1. 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_64
    2. To 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+rt
    3. To configure kernel-rt as the default boot kernel, enter the following command:
      # grubby --set-default=/boot/vmlinuz-6.12.0-55.14.1.el10_0.x86_64+rt

Results

  • To verify kernel-rt is the default kernel, enter the following command:
    # grubby --default-kernel
    /boot/vmlinuz-6.12.0-55.14.1.el10_0.x86_64+rt