How to Install Linux Kernel 6.2 or 6.3 on Fedora Linux

The Linux Kernel 6.2 release includes various new features, improvements, and fixes. Some of the prominent features of this release include faster mitigation of the Retbleed vulnerability and a new FineIBT mitigation feature, Btrfs RAID5/6 and performance improvements, sysfs knobs that allow controlling block device writeback, support for TCP Protective Load Balancing, improved Rust support, BPF features like user-defined objects, the runtime verification tool, and some optional RCU power savings.

The Retbleed vulnerability, which can be fixed with some mitigation techniques, considerably impacts performance. This release implements a new mitigation scheme, a lighter-weight software-only fix for Skylake-based cores. The new method can be enabled with the boot option retbleed=stuff. Additionally, the release adds FineIBT, a new control flow integrity scheme that uses hardware IBT support where present to annotate and track indirect branches using a hash to validate them.

The Btrfs RAID5/6 implementation has received some reliability improvements, and there are performance improvements for btrfs send, lseek, and the FIEMAP ioctl. The release also enables asynchronous discard when possible. With five new sysfs knobs under each bdi (block device interface) at /sys/class/bdi/, the writeback mechanism has finer-grained control.

The release supports TCP Protective Load Balancing, reducing link load imbalance across data center switches. It leverages congestion signals from the transport layer to randomly change the path of the connection experiencing congestion. This release also supports user-defined BPF objects, improved Rust support, and some optional power savings due to improved RCU locking.

If you are interested in installing Linux Kernel 6.2 on Fedora Linux using the Linux vanilla repository, this release will surely interest both Linux users and developers. This release includes various new features, improvements, and fixes. Additionally, instructions are available for installing the upcoming development version of Linux Kernel 6.3. This makes it a great option for those who want to keep up-to-date with the latest kernel development while enjoying the benefits of the stable 6.2 release.

Update Fedora

Before installing kernels, it is important to ensure your system is up-to-date. You can do this by using the command below.

sudo dnf upgrade --refresh

Option 1: Install Linux Kernel 6.2

To install Linux Kernel 6.2 on your Fedora system using the Linux vanilla repository, follow the steps in this section.

First, enable the “@kernel-vanilla/mainline-wo-mergew” repository by running the following command:

sudo dnf copr enable @kernel-vanilla/mainline-wo-mergew

It is important to note that a second mainline repository features the latest changes in the upstream, which is currently Linux Kernel 6.3.

Next, run the following command to begin the kernel upgrade process:

sudo dnf upgrade 'kernel*'

This will upgrade all packages related to the kernel.

Once the upgrade is complete, it is necessary to reboot your system to ensure that the new kernel is loaded properly. Use the following command to reboot:

reboot

After the system has restarted, verify that the new kernel version is installed by running the following command:

cat /proc/version

This will display the version of the currently running kernel. If the installation was successful, this command should confirm that Linux Kernel 6.2 is installed. You can also verify the kernel version using tools like “Neofetch” or similar system information utilities:

Option 2: Install Linux Kernel 6.3

If you are a developer or an advanced user who wants to test the latest changes to the Linux kernel, you can install the “@kernel-vanilla/mainline” repository. However, it is important to note that this repository is not meant for production or computer desktops where glitches or start-overs are not affordable. Follow the steps to install Linux Kernel 6.3 using the Linux vanilla repository.

Enable the COPR “@kernel-vanilla/mainline” repository by running the following command:

sudo dnf copr enable @kernel-vanilla/mainline

Next, run the following command to begin the kernel upgrade process:

sudo dnf upgrade 'kernel*'

This will upgrade all packages related to the kernel.

Once the upgrade is complete, it is necessary to reboot your system to ensure that the new kernel is loaded properly. Use the following command to reboot:

reboot

After the system has restarted, verify that the new kernel version is installed by running the following command:

sudo dnf upgrade 'kernel*'

This will display the version of the currently running kernel. If the installation was successful, this command should confirm that Linux Kernel 6.3 is installed. You can also verify the kernel version using tools like “Neofetch” or similar system information utilities:

How to Restore Fedora Default Kernel

To restore the default kernel in Fedora, follow the steps. First, you must disable the previously enabled repositories by running the following commands.

To disable @kernel-vanilla/mainline-wo-merge, use the following command:

sudo dnf copr disable @kernel-vanilla/mainline-wo-mergew

To disable “@kernel-vanilla/mainline,” use the following command:

sudo dnf copr disable @kernel-vanilla/mainline-wo-mergew

To disable @kernel-vanilla/mainline, use the following command:

sudo dnf copr disable @kernel-vanilla/mainline

Use the “sudo dnf –refresh distro-sync kernel” command to resync your kernel to that of Fedora’s current stable release for your Fedora distribution:

sudo dnf --refresh distro-sync kernel
  1. Reboot your system using the following command:
reboot

Once logged back in, verify the installed kernel using the “cat /proc/version” command.

cat /proc/version

Example with Neofetch after restoring the default Linux Kernel:

To list the kernels present on Fedora that are installed and not in use, run the following command:

dnf list kernel

Example output:

Installed Packages
kernel.x86_64 6.1.13-200.fc37                                 @updates                            
kernel.x86_64 6.2.0-262.vanilla.fc37                          @copr:copr.fedorainfracloud.org:group_kernel-vanilla:mainline-wo-mergew
kernel.x86_64 6.3.0-0.rc0.20230223gta5c95ca1.203.vanilla.fc37 @copr:copr.fedorainfracloud.org:group_kernel-vanilla:mainline

This will display a list of installed kernels. To remove any unused kernels, use the following command:

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

Example with Linux Kernel 6.1 and 6.2, 6.3 being removed per the first example of listing kernels on the test machine.

Conclusion

In conclusion, the Linux kernel is a critical component of the Fedora operating system, and upgrading it can improve system performance and security. This guide has explored various options for installing and managing the Linux kernel on Fedora with the Linux Vanilla repository and the @kernel-vanilla/mainline branch. Each option provides unique benefits, depending on the user’s needs and technical skills. The guide also provided detailed instructions on restoring the default kernel, enabling users to switch back to the stable version of the kernel in case of any issues. Following these instructions, users can easily upgrade, downgrade, or restore their Linux kernel, ensuring optimal system performance and stability.

FAQs on Linux Kernel with Fedora

Q: What is the difference between the Fedora upstream method and the Linux Vanilla repository?

A: The Fedora upstream method is often recommended for users who do not want to use third-party kernels, as it is designed to work with Fedora. On the other hand, the Linux Vanilla repository often has more up-to-date, stable, and mainline kernels but is not directly supported by Fedora.

Q: Are any risks associated with upgrading the Linux kernel on Fedora?

A: Upgrading the Linux kernel on Fedora carries some risks, such as compatibility issues with certain hardware and software. It is recommended to back up important data before proceeding with any kernel upgrade. Additionally, it is important to use the most stable release available and avoid using development versions unless you are an advanced user or developer.

Q: How can I remove a specific Linux kernel version on Fedora?

A: To remove a specific version of the Linux kernel on Fedora, use the “dnf remove” command followed by the specific kernel version you wish to remove. For example: “sudo dnf remove kernel-6.3.0-0.rc0.20230223gta5c95ca1.203.vanilla.fc37.x86_64”.

Q: Is it recommended to use the development version of the Linux kernel for production systems?

A: No, using the development version of the Linux kernel for production systems is not recommended. The development version is intended for testing and may contain bugs or other stability issues.

Q: Can I install Linux Kernel 6.2 and 6.3 on my system?

A: Yes, you can install both Linux Kernel 6.2 and 6.3 on your system, but it is not recommended unless you have a specific need for both versions. Sticking with the latest stable version is generally best unless you have a specific reason to use an older version.

Q: What is the benefit of using the Linux Vanilla repository over the Fedora repository?

A: The Linux Vanilla repository often contains the latest stable and mainline kernels, which may be more up-to-date than those available in the Fedora repository. This can benefit advanced users and developers who require the latest features and improvements.

Q: Is it recommended to remove unused kernels from my system?

A: Yes, it is generally recommended to remove unused kernels from your system to free up disk space and improve system performance. However, it is important to be cautious when removing kernels and only remove those not currently in use.

Share to...