This guide outlines the steps to install Linux Kernel to version 6.8 on CentOS Stream, primarily for users with newer hardware. Upgrading the kernel is crucial for enhancing system performance and compatibility. However, it’s important to note that moving away from CentOS Stream’s default kernel might introduce compatibility issues. This method is advisable for users requiring the latest hardware support or features not in the default kernel.
CentOS Stream serves as an upstream for RHEL and is a beta or preview, in a way, a rolling-release model before eventually making its way to RHEL. Upgrading to Kernel 6.8 on CentOS Stream can further enhance its capabilities, ensuring users benefit from the latest kernel improvements.
Import Linux Kernel 6.8 ELRepo RPM on CentOS Stream
Update CentOS Stream Before Linux Kernel 6.8 Installation
Before installing the Linux Kernel 6.8, it’s essential to ensure that your system is up-to-date. You can check and install all existing packages by updating your system with the following command:
sudo dnf upgrade --refresh
Import ELRepo RPM Repository on CentOS Stream
To install and upgrade Linux kernels using the dnf package manager without compiling kernels, you’ll first need to import the repository from the ELRepo project. This repository provides the latest available mainline kernel with regular updates.
Import ELRepo GPG Key
To import the GPG key for a successful installation, use the following command:
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
Add ELRepo RPM Repository
After importing the GPG key, install the repository using the appropriate command for your distribution version. Ensure you import the correct version for your system to avoid kernel installation failure. Follow the instructions below to install the repository successfully.
Import ELRepo for CentOS Stream 9:
sudo dnf install https://www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm -y
Import ELRepo for CentOS Stream 8
sudo dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm -y
Verify the Repository ELRepo RPM Import on CentOS Stream
Once you’ve imported the repository, you can 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 the repository is ready for installation. Follow the instructions below to search for supported kernels on ELRepo.
dnf list available --disablerepo='*' --enablerepo=elrepo-kernel
After running the command, the output will display the list of available kernels supported by ELRepo. You can then proceed with the installation of Linux Kernel 6.8.
Install Linux Kernel 6.8 on CentOS Stream
Select Linux Kernel 6.8 Installation Packages
Method 1: Install Linux Kernel 6.8 Mainline Package Only
After importing the ELRepo repository, you can install Linux Kernel 6.8 on your CentOS Stream 9 or CentOS Stream 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).
Method 2: Install Additional Linux Kernel 6.8 Packages (Optional)
If you require the full suite of kernel packages, including Linux Kernel headers, modules, and extra modules, 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, using the first command in Step 1 is recommended.
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. If Kernel 6.8 is not the default option during the boot window, select it. 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
Verify the Linux Kernel 6.8 Installation on CentOS Stream
After rebooting your CentOS Stream 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.
Check the Linux Kernel Version on CentOS Stream
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 CentOS Stream system. If the installation was successful, the output should show the Linux Kernel 6.8 version number.
Review System Information
You can use the command with the option for more detailed information about your system, including the Linux Kernel version. 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 CentOS Stream
Updating your Linux Kernel ensures a smooth and secure system operation, providing new features, better hardware support, and security patches.
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.
Restoring the Default Kernel on CentOS Stream
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 on CentOS Stream
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 After Linux Kernel 6.8 Removal on CentOS Stream
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
Removing 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
Alright, we’ve just wrapped up our journey through how to install Linux Kernel 6.8 on CentOS Stream. This guide walked you through the whole process, from start to finish. We’ve seen how the 6.8 update amps up your system with better hardware support, smoother file management, and some neat code tweaks. Plus, those new drivers? They’re like fresh air for your system’s performance and security. Remember, staying updated with these kernel releases is like giving your system a regular health check – it keeps things running smoothly and securely.