How to Install Linux Kernel 6.8 on Rocky Linux

This guide will demonstrate how to install Linux Kernel 6.8 on Rocky Linux, a task that can significantly enhance your system’s performance and compatibility. Upgrading to this latest kernel version brings many improvements and new features, making it worthwhile for anyone looking to optimize their Rocky Linux experience. As we delve into the technical aspects, we’ll provide clear and straightforward instructions to ensure a smooth installation process. Whether you’re a seasoned Linux user or new to the platform, this guide aims to equip you with the knowledge needed to upgrade your kernel successfully.

Import Linux Kernel 6.8 Repository

Update Rocky Linux Before Linux Kernel 6.8 Installation

Before installing Linux Kernel 6.8, ensuring your system is up-to-date is essential. 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 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 on Rocky Linux:

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.

To do this, you can search for ELRepo to see the list of supported kernels. By verifying the supported kernels, you can ensure that the repository is ready for the kernel installation. 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.8.

Proceed to Install Linux Kernel 6.8 on Rocky Linux

Select Installation Option for Linux Kernel 6.8

Method 1: Install Linux Kernel 6.8

After importing the ELRepo repository, you can install Linux Kernel 6.8 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.8 (kernel-ml). By executing this command, you ensure your system has the latest mainline kernel version available from the ELRepo repository.

Method 2: Install Linux Kernel 6.8 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 Method 1. The primary kernel installation should be sufficient for most users.

Reboot Your System After Linux Kernel 6.8 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.8 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.8. To confirm this, you can run the command:

uname -r

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

Verify Linux Kernel 6.8 Installation on Rocky Linux

After rebooting your Rocky Linux system and selecting Linux Kernel 6.8 during the boot process, verifying the installation’s success is essential.

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.8 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.8 version number in the output to confirm that it runs on your system.

Additional Linux Kernel 6.8 Commands on Rocky Linux

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.8, using the ELRepo repository and how to restore the default kernel in case of issues.

Update Linux Kernel 6.8

To check and update your Linux Kernel 6.8, 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.8 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) on Rocky Linux

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

We’ve just walked through the steps to get Linux Kernel 6.8 up and running on Rocky Linux 9 or 8. It’s a game changer boosting your system’s performance and security. Just a heads up – keep an eye on how your system reacts post-upgrade, especially if you’re using specific hardware or software that might be sensitive to changes.

1 thought on “How to Install Linux Kernel 6.8 on Rocky Linux”

Leave a Comment


Your Mastodon Instance
Share to...