How to Install Linux Kernel 6.10 on Rocky Linux 9 or 8

The Linux kernel 6.10 has been officially released, bringing a range of new features and improvements to enhance system performance, hardware support, and security. Some of the major highlights of this release include enhanced support for newer hardware like the ASUS ROG 2024 series and Lenovo ThinkPad 13X, improved gaming device compatibility with the Steam Deck’s IMU motion sensors and new drivers for gaming controllers, and performance updates for Intel and AMD CPUs. Additionally, this release introduces improvements in file systems like Bcachefs and EROFS, as well as new security features such as a memory sealing system call (mseal()) and expanded Rust language support.

To install Linux kernel 6.10 on Rocky Linux 9 or 8, you can use the ELRepo kernel mainline repository, which provides access to the latest kernel builds. ELRepo is known for offering a wide range of kernel and hardware-related packages that are not included in the standard Rocky Linux repositories. This guide will walk you through the steps to set up the ELRepo repository and install the latest kernel.

Update Rocky Linux Before Linux Kernel 6.10 Installation

Before installing Linux Kernel 6.10, it is essential to ensure your system is up to date. By updating your system, you can ensure that all existing packages are current and compatible with the new kernel.

To check and install any updates, use the following command:

sudo dnf upgrade --refresh

Import ELRepo RPM Kernel Repository

To install and upgrade Linux kernels using the dnf package manager without manual compilation, you’ll first need to import the repository from the ELRepo project. This repository provides the latest mainline kernel with regular updates, making it a convenient choice for kernel management.

Import ELRepo GPG Key on Rocky Linux:

To ensure a successful installation, import the GPG key for the ELRepo repository. This key is used to verify the authenticity and integrity of the packages provided by the repository. To import the GPG key, use the following command:

sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

Import ELRepo Repository:

After importing the GPG key, you can proceed to install the repository. To avoid kernel installation failure, use the appropriate command for your distribution version (Rocky Linux 9 or Rocky Linux 8). Then, follow the instructions below to install the repository successfully.

Import ELRepo for Rocky Linux 9

sudo dnf install https://www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm -y

Import ELRepo for Rocky Linux 8

sudo dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm -y

Verify the ELRepo Repository Import

Once you’ve imported the repository, it’s a good practice to verify its successful import by checking for the supported kernels available for installation on ELRepo.

Use the following command to search for supported kernels on ELRepo:

dnf list available --disablerepo='*' --enablerepo=elrepo-kernel

You have successfully imported the ELRepo repository on your Rocky Linux system and verified the available kernels. You are now ready to proceed with the installation of Linux Kernel 6.10.

Finalize Linux Kernel 6.10 Installation

Step 1: Install Linux Kernel 6.10

After importing the ELRepo repository, you can install Linux Kernel 6.10 on your Rocky Linux 9 or Rocky Linux 8 Enterprise Linux distribution. To do this, open your terminal and enter the following command:

sudo dnf --enablerepo=elrepo-kernel install kernel-ml

This command will enable the ELRepo kernel repository and proceed with installing Linux Kernel 6.10 (kernel-ml). By executing this command, you ensure your system has the latest mainline kernel version available from the ELRepo repository.

Step 2: Install Linux Kernel 6.10 Additional Kernel Packages (Optional)

If you require the full suite of kernel packages, including Linux Kernel headers, modules, and extra modules, you may choose to install these additional packages. These packages can be helpful for development purposes or when working with specific hardware devices that require extra modules. To install the additional kernel packages, use the following command:

sudo dnf --enablerepo=elrepo-kernel install kernel-ml kernel-ml-core kernel-ml-headers kernel-ml-modules kernel-ml-modules-extra

This command installs all the additional kernel packages available in the ELRepo repository. If you’re unsure whether you need these packages, it’s recommended that you use the first command in Step 1. The primary kernel installation should be sufficient for most users.

Step 3: Reboot Your System After Linux Kernel 6.10 Installation

Once the installation is complete, it’s essential to reboot your system to apply the changes. Rebooting ensures that the new kernel version is loaded and properly initialized. During the boot window, select Kernel 6.10 if it’s not set as the default option. Remember that you can switch back to any kernel listed in the boot window if you encounter any issues with the new version.

To reboot your system, enter the following command:

sudo reboot

After rebooting, your Rocky Linux system should now run Linux Kernel 6.10. To confirm this, you can run the command:

uname -r

This output should match the 6.10 Linux Kernel you just installed.

Verify Linux Kernel 6.10 Installation

After rebooting your Rocky Linux 9 or Rocky Linux 8 system and selecting Linux Kernel 6.10 during the boot process, verifying that the installation was successful is essential. This section will guide you through the steps to confirm that your system runs the newly installed Linux Kernel 6.10.

Open Your Terminal

Once your system has rebooted, open your terminal by searching for “Terminal” in the applications menu if you use a desktop UI.

Check the Linux Kernel Version

To check the currently running Linux Kernel version on your system, enter the following command in the terminal:

uname -r

This command will display the kernel version of your Rocky Linux 9 or Rocky Linux 8 system. If the installation was successful, the output should show the Linux Kernel 6.10 version number. The version number confirms that your system has successfully switched to the newly installed kernel.

Review System Information

For more detailed information about your system, including the Linux Kernel version, you can use the uname command with the -a option. This option provides an extensive overview of your system’s characteristics, such as the operating system, hostname, and processor information. Enter the following command in the terminal:

uname -a

This command will display detailed system information, including the Linux Kernel version, system architecture, and build date. Look for the Linux Kernel 6.10 version number in the output to confirm that it runs on your system.

Additional Linux Kernel 6.10 Commands

Updating your Linux Kernel ensures a smooth and secure system operation, providing new features, better hardware support, and security patches. This section will explain how to update your Linux Kernel to the latest version, 6.10, using the ELRepo repository and how to restore the default kernel in case of issues.

Update Linux Kernel 6.10

To check and update your Linux Kernel 6.10, use the following command as you would with any other package using the DNF manager:

sudo dnf upgrade --refresh

Please note that after any kernel update, you must reboot your system to ensure the new kernel is in use. You can choose which kernel to use during the boot process if any issues arise.

Restore the Default Kernel on Rocky Linux

If you experience bugs or other issues with the new kernel, it may be necessary to restore the default kernel. Follow these steps to return to the previous kernel version:

Disable the ELRepo Repository

Disable the ELRepo repository by using the following command:

sudo dnf config-manager --set-disabled elrepo

You can confirm that the repository has been disabled by using the following command:

dnf repolist

Re-install Default Kernel Packages

To re-install the default kernel packages, execute the following command in your terminal.

sudo dnf reinstall kernel kernel-core kernel-modules kernel-headers

Rebooting Your System

To reboot your system, use the following command in the terminal:

reboot

Select the original Linux Kernel you had installed during the boot process to switch back to your default kernel. This will restore your previous kernel version automatically. To confirm that the 6.10 Linux kernel has been removed after you have returned to your system, run the following command in the terminal:

uname -r

Remove Unused Kernels (Optional)

You can remove all unused kernels by using the following command. However, use this command with caution:

sudo dnf --setopt=protected_packages= remove $(rpm -q kernel-core | grep -v $(uname -r))

Conclusion

With Linux kernel 6.10 successfully installed on your Rocky Linux system using the ELRepo kernel mainline repository, you can take advantage of the latest hardware support, performance enhancements, and security features. Regularly updating your kernel through ELRepo ensures you stay current with the latest developments. Enjoy the improved functionality and robustness that kernel 6.10 brings to your Rocky Linux environment.

1 thought on “How to Install Linux Kernel 6.10 on Rocky Linux 9 or 8”

  1. Nice. A few issues:
    1) using `–repo=elrepo-kernel` can be used as a shortcut for `–enablerepo=elrepo-kernel –disablerepo=”*”`
    2) The steps leave elrepo-kernel disabled as it is never explicitly enabled. So subsequent `dnf upgrade` comands will reinstall the 5.14 kernel again. You probably want to add the step `dnf config-manager –set-enabled=elrepo-kernel` to leave it enabled.
    3) The command to disable the kernel repo again uses “elrepo” and not “elrepo-kernel” as the reponame.

    Reply

Leave a Comment