The Linux operating system is a popular open-source platform used by developers, businesses, and individuals for its stability, security, and flexibility. Linux Kernel 6.2 is the latest version of the Linux Kernel, officially released by its creator, Linus Torvalds. This latest release comes just over a month after the previous version, Linux Kernel 6.1.
Linux Kernel 6.2 introduces several new features and updates to improve its performance and functionality. One significant addition is the out-of-the-box support for Intel Arc graphics, making it easier for users to run Intel’s new GPUs on their Linux systems. Additionally, support for Intel’s On-Demand driver is included, providing more power-saving options for Intel-based systems.
Another notable feature of Linux Kernel 6.2 is the support for Raspberry Pi 4K @ 60Hz display, a welcome addition for Raspberry Pi enthusiasts. The update also includes USB 4 Wake-on-Connect/Disconnect support, which improves connectivity and user experience.
Linux Kernel 6.2 also supports ChromeOS Human Presence Sensor (HPS), FBDEV support for the “nomodeset” option, and mainline support for Apple’s latest M1 Pro, Max, and Ultra chips. Early NVIDIA RTX 30/Ampere GPU support in Nouveau and updated Zstd compression code are also included in this latest version.
Moreover, Linux Kernel 6.2 expands its support for RISC-V architecture by introducing support for persistent memory devices. The update also adds Allwinner A100 and D1 display support within the Sun4i DRM driver and miscellaneous Btrfs performance enhancements.
If you’re running Rocky Linux 9 or Rocky Linux 8 on your desktop or server, this guide will help you install Linux Kernel 6.2 by using CLI commands to import the ELRepo. Follow the steps below for a smooth and hassle-free installation process.
Table of Contents
Step 1: Update Rocky Linux
To ensure a successful installation of Linux kernels and avoid conflicts, it is crucial to update your system by checking and installing all existing packages. Therefore, it is recommended that you update your system before beginning the installation process.
sudo dnf upgrade --refresh
Step 2: Import ELRepo Repository
To install and upgrade Linux kernels using the dnf package manager without compiling kernels, you must first import the repository from the ELRepo project. This repository provides the latest available mainline kernel with regular updates. The first step is to import the GPG key to verify the installation package.
Use the following command to import the GPG key for a successful installation:
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
After importing the GPG key, the next step is to install the repository using the appropriate command for your distribution version. It is essential to ensure that you import the correct version for your system to avoid kernel installation failure. Follow the instructions below carefully 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
After importing 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 that the repository is ready for installation. Follow the instructions below to search for supported kernels on ELRepo.
dnf list available --disablerepo='*' --enablerepo=elrepo-kernel
Example output:
kernel-ml.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-core.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-devel.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-devel-matched.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-doc.noarch 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-headers.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-modules.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-modules-extra.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-tools.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-tools-libs.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
kernel-ml-tools-libs-devel.x86_64 6.2.0-1.el9.elrepo elrepo-kernel
Step 3: Install Linux Kernel 6.2 with ELRepo
To install the Linux Kernel 6.2, use the following command in your terminal:
sudo dnf --enablerepo=elrepo-kernel install kernel-ml
If you require the full suite of kernel packages, including Linux Kernel headers, modules, and extra modules, use the following command and remove any packages you do not need. However, use the first command if you are unsure.
sudo dnf --enablerepo=elrepo-kernel install kernel-ml kernel-ml-core kernel-ml-headers kernel-ml-modules kernel-ml-modules-extra
After the installation is complete, reboot your system. During the boot window, select Kernel 6.2 if it is not set as the default. Remember, if you encounter any issues, you can switch to any kernel listed in the boot window.
sudo reboot
Example:
After rebooting your system, you can verify the successful installation of the new Kernel by checking its version and build.
uname -r
Example output:
6.2.0-1.el9.elrepo.x86_64
Congratulations, you have successfully installed the latest Linux kernel 6.2 on your Rocky Linux 9 or 8 workstation desktop or a headless server.
Additional Tips
Update Linux Kernel 6.2
To keep the Kernel up to date and avoid any potential conflicts, use the following command as you would with any other package to check and update your Linux Kernel 6.2 using the DNF manager:
sudo dnf upgrade --refresh
It is important to note that for any kernel updates, you will need to reboot your system to ensure the new Kernel is in use.
Restore Default Kernel
For users who experience bugs with the new kernel or other issues, it may be necessary to restore the default kernel. Follow the steps below to restore the default kernel:
Disable the ELRepo repository by using the following command:
sudo dnf config-manager --set-disabled elrepo
Confirm that the repository has been disabled by using the following command:
dnf repolist
Reinstall the default kernel packages by using the following command:
sudo dnf reinstall kernel kernel-core kernel-modules kernel-headers
Reboot your system by using the following command:
reboot
During the boot process, select the default Linux Kernel to use. This should automatically restore your previous kernel version.
Once you have successfully returned to your system, confirm that the 6.2 Linux kernel has been removed by using the following command:
uname -r
Optionally, you can remove all unused kernels by using the following command. However, exercise caution while using this command:
sudo dnf --setopt=protected_packages= remove $(rpm -q kernel-core | grep -v $(uname -r))
Conclusion
In conclusion, updating or restoring your Linux Kernel 6.2 is essential in ensuring that your Rocky Linux system operates at its best. Updating or restoring your kernel involves various commands that are easy to follow and execute in your terminal. By keeping your kernel up-to-date, you can take advantage of the new features and updates that can enhance the overall performance of your system. However, if you experience any issues with the new kernel, it is always possible to restore the default kernel using the steps mentioned earlier in this guide. By following these guidelines and exercising caution, you can maintain your Rocky Linux system’s stability, security, and flexibility.
FAQ on Linux Kernel 6.2 with Rocky Linux
Q: What is Linux Kernel 6.2, and why should I upgrade my system?
A: Linux Kernel 6.2 is the latest version of the Linux Kernel and includes several new features and updates that improve the performance and functionality of your system. By upgrading to the latest kernel, you can take advantage of the new features, improved stability, and enhanced security.
Q: How can I install Linux Kernel 6.2 on my Rocky Linux 9 or Rocky Linux 8 system?
A: To install Linux Kernel 6.2, you can use the ELRepo repository and follow the instructions outlined in our guide. Import the repository, install the Kernel, and then reboot your system. You can verify the successful installation using commands such as “uname -r” or “hostnamectl.”
Q: How do I restore my default kernel if I experience issues with the new Linux Kernel 6.2?
A: If you encounter issues with the new kernel, you can restore the default kernel by disabling the ELRepo repository, reinstalling the default kernel packages, and rebooting your system. Use the “sudo dnf config-manager –set-disabled elrepo” command to disable the repository and “sudo dnf reinstall kernel kernel-core kernel-modules kernel-headers” to reinstall the default kernel packages.
Q: How can I keep my Linux Kernel up-to-date and avoid conflicts?
A: To keep your Linux Kernel up-to-date and avoid potential conflicts, use the “sudo dnf upgrade –refresh” command in your terminal. This command will check for updates and update your system’s packages, including the kernel. It is recommended to reboot your system after updating your kernel.
Q: Can I remove unused kernels from my system?
A: Yes, you can remove unused kernels from your system. Use the “sudo dnf –setopt=protected_packages= remove $(rpm -q kernel-core | grep -v $(uname -r))” command to remove all unused kernels. However, exercise caution while using this command.
Q: Are any risks associated with updating or restoring my Linux Kernel?
A: Updating or restoring your Linux Kernel involves some risks, as with any system modification. These risks include compatibility issues, hardware or software conflicts, or system instability. However, following our guide carefully and exercising caution can mitigate these risks and help ensure a smooth and hassle-free process. It is also recommended to have a backup solution before installing kernels, particularly on critical systems, to avoid unforeseen issues.
Q: What new features and updates are included in Linux Kernel 6.2?
A: Linux Kernel 6.2 includes several new features and updates, including out-of-the-box support for Intel Arc graphics, Intel’s On-Demand driver, Raspberry Pi 4K @ 60Hz display support, USB 4 Wake-on-Connect/Disconnect support, ChromeOS Human Presence Sensor (HPS) support, and more. Additionally, the new kernel version includes updates to the Zstd compression code, Btrfs performance enhancements, and support for persistent memory devices.
Q: How often should I update my Linux Kernel?
A: The frequency of Linux Kernel updates can vary depending on your system’s requirements and preferences. It is generally recommended to keep your system up-to-date with the latest security patches and feature updates, including kernel updates. However, it is also important to exercise caution and test updates thoroughly before deploying them on critical systems.
Q: Is it safe to remove old kernel versions from my system?
A: Removing old kernel versions from your system is generally safe if you keep a backup solution and exercise caution while using the necessary commands. However, keeping at least one or two previous kernel versions as a fallback option is recommended in case of compatibility issues or other unforeseen problems with the latest version.
Q: What is ELRepo, and why should I use it for Linux Kernel?
A: ELRepo is a third-party repository that supports additional hardware, software, and kernel features that are not included in the base distribution. It is an acronym for Enterprise Linux Repository and is specifically designed to cater to users of Enterprise Linux distributions such as Rocky Linux, CentOS, and RHEL. ELRepo provides the latest mainline kernel version with regular updates, which can be installed using the DNF package manager. Using ELRepo for your Linux Kernel updates ensures you have access to the latest kernel features, bug fixes, and security patches. You can also avoid compatibility issues with your hardware and software.