From Fedora Project Wiki

(small fixes and improvements)
mNo edit summary
 
(179 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Package repositories with Linux vanilla kernel packages for Fedora =  
= Linux vanilla kernel repositories for Fedora Linux =


The [http://repos.fedorapeople.org/repos/thl/ Linux vanilla kernel repositories for Fedora] offer RPM packages containing vanilla builds of different Linux kernel version lines. These packages are meant for Fedora users that want to access the latest stable versions or pre-releases of the Linux kernel quickly and comfortably; there is also one repositories meant for users who want to check if problems they face are specific to the Fedora kernel or present in the upstream kernel as well.
The kernel vanilla repositories allow you to quickly, comfortably, and cleanly install the latest upstream Linux kernel versions on Fedora Linux. [https://copr.fedorainfracloud.org/groups/g/kernel-vanilla/coprs/ Seven 'coprs' offer various ready-to-use kernel packages] built from upstream Linux series like ‘mainline’ and ‘stable’. The provided RPMs are ideal for both quick tests and regular day-to-day use.


= How to use these repos =
To simply install the latest kernel version indented for end users, follow the instructions in the [[#Install the newest Linux version|next section]], which provides a quick start; for kernels from mainline and other series, scroll down a bit further to '[[#Detailed instructions for installing and uninstalling vanilla kernel packages|Detailed instructions for installing and uninstalling vanilla kernel packages]]'. Note, both sections are meant for users of Fedora variants like Workstation, Server, or KDE Plasma Desktop; in case you are using a Fedora Atomic variant like Silverblue or Kinoite, head over to '[[#Instructions for Fedora Atomic variants|Instructions for Fedora Atomic variants]]'.


== How to use, the TLDR version ==
== Install the newest Linux version ==


Download the definitions for the Kernel vanilla repositories:
To install the latest Linux kernel version meant for regular end users run the following commands:
<pre>
curl -s https://repos.fedorapeople.org/repos/thl/kernel-vanilla.repo | sudo tee /etc/yum.repos.d/kernel-vanilla.repo
</pre>


Run this to install the latest mainline (aka pre-release) kernel:
<pre>
<pre>
sudo dnf --enablerepo=kernel-vanilla-mainline update
sudo dnf -y copr enable @kernel-vanilla/stable
sudo dnf upgrade 'kernel*'
mokutil --sb-state
</pre>
</pre>


Run this if you want the latest stable kernel instead:
The first two commands enable the ‘stable’ copr, from which DNF then will install the newest proper mainline kernel release (say 6.1) or the latest version from a stable series derived from it (e.g. 6.1.1, 6.1.2, …). The third command will tell you if UEFI Secure Boot is active on your system. If that's the case you have to either disable it in your system's BIOS Setup or through a process initiated through <code>mokutil --disable-validation</code>; that's required, as your firmware will otherwise reject booting kernels installed from these repositories.
<pre>
sudo dnf --enablerepo=kernel-vanilla-stable update
</pre>


Reboot. That's it – at least often, as sometimes additional steps are necessary:
== Detailed instructions for installing and uninstalling vanilla kernel packages ==


* If UEFI Secure Boot is active on your system (which is the case on most modern systems), you'll have to disable it in your BIOS Setup or via <code>mokutil --disable-validation</code>. This is required to run kernels from these repositories, as they are not signed with a key a normal systems will trust. If you're don't known if UEFI Secure Boot is active on your system, run <code>mokutil --sb-state</code> to find out.  
The following two sub-section describe how to chose an kernel vanilla copr for your use case and install a kernel from it; a third sub-section explains how to later remove the copr and kernels installed from.


* The new kernel that above commands install will normally get started by default. If that's not the case there is likely something fishy with your boot configuration. For example, if you start Fedora using a boot manger from a different Linux install you'll have to boot into the latter and update its boot loader configuration; in Ubuntu you for example do that by running <code>update-grub</code>.
=== Choosing a kernel vanilla copr appropriate for your needs ===


* The "dnf update"-command doesn't offer anything to install? Then the version of the Fedora kernel package is higher than the version offered in the kernel-vanilla repository you chose. In that case the kernel vanilla repositories are lagging behind (its maintainers sometimes are on holiday, too!), hence it might be the best to stick to the kernel your have.
Use the following table to decide which of the seven @kernel-vanilla coprs ('fedora', 'fedora-rc', 'stable', 'stable-rc', 'mainline-wo-mergew', 'mainline', or 'next') provides the kernels you want to use. To query the versions currently shipped by each of these coprs, [https://www.leemhuis.info/files/kernel-vanilla/repostatus.txt check out the repostatus file].


You just want to use kernels from the kernel vanilla repositories for a short test? In that case once you finished your tests boot into the stock Fedora kernel again. Then uninstall all packages from these repos with the command <code>sudo dnf remove $(rpm -qa 'kernel*' | grep '.vanilla.knurd' )</code>.  
{| class="wikitable"
!style="width: 27%;"|copr
!style="width: 30%;"|provided kernels
!style="width: 13%;"|example version sequence
!style="width: 30%;"|target users
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/fedora/ @kernel-vanilla/fedora]'''
| The latest kernel version from the series the relevant Fedora Linux release currently uses or will likely receive within a few days; for stable releases of Fedora Linux this is the latest stable series or its predecessor.
| …, 6.0.18,<br>6.0.19,<br>6.1.5,<br>6.1.6, …
| This allows checking if a bug that happens with Fedora's kernel also occurs with the latest upstream version from the same kernel series – or the one that Fedora Linux release will retrieve within days.
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/fedora-rc/ @kernel-vanilla/fedora-rc]'''
| Pre-releases of the next release from the stable series the relevant Fedora Linux release currently uses or will likely receive within a few days; for stable releases of Fedora Linux this is the latest stable series or its predecessor.
| …, 6.0.18,<br>6.0.19-rc1,<br>6.0.19,<br>6.1.5-rc1,<br>6.1.5, …
| Anyone who wants to help testing Linux kernel version from the latest stable series or its predecessor about to be released.
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/stable/ @kernel-vanilla/stable]'''
| The latest kernel version meant for regular end users; usually this is the newest version from the latest stable series, occasionally the latest mainline release.
| …, 6.0.15,<br>6.1,<br>6.1.1,<br>6.1.2, …
| Anyone who wants the latest and greatest kernel intended for regular users.
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/stable-rc/ @kernel-vanilla/stable-rc]'''
| Pre-releases of the next release from the latest stable series.
| …, 6.0.15-rc1,<br>6.0.15,<br>6.1,<br>6.1.1-rc1,<br>6.1.1, …
| Anyone who wants to help testing Linux kernel version from the latest stable series about to be released.
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/mainline-wo-mergew/ @kernel-vanilla/mainline-wo-mergew]'''
| The latest mainline kernel, either built from a pre-release (aka "rc kernel") or a Git snapshot of the day – albeit the latter only after -rc1 was released.
| …, 6.1-rc8-20221211,<br>6.1,<br>6.1.1-rc1,<br>6.1.1,<br>6.2-rc1,<br>6.2-rc1-20221226, …
| Anyone who wants to run a kernel built from the latest Linux codebase, except when mainline is in a 'merge window' – that is the phase right after a new mainline release (say 6.1) when the bulk of changes (including all riskier ones!) are merged for the next mainline version; this phase ends after two weeks with the publication of the next mainline kernel's first pre-release (e.g. 6.2-rc1).
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/mainline/ @kernel-vanilla/mainline]'''
| The latest mainline kernel build from a Git snapshot of the day.
| …, 6.1-rc8-20221211,<br>6.1,<br>6.2-rc0-20221213,<br>6.2-rc0-20221214, …
| Anyone who wants to run kernels built from the latest Linux codebase.
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/next/ @kernel-vanilla/next]'''
| Linux-next kernels.
| …, 6.1-0.0.next.20221209,<br>6.2-0.0.next.20221212, <br>6.2-0.0.next.20221213, …
| Anyone who wants to run linux-next or test if the changes slated for inclusion in the next mainline cycle fix a problem.
|}
 
'''Note''', only the coprs ‘fedora’ and ‘next’ are stand-alone. The other five each include other coprs as a runtime dependency; usually it are those mentioned earlier in the table, except that the ‘fedora-rc’ copr is not a dependency of the ‘stable’ copr.
 
Users of the 'mainline' copr thus outside of merge windows will receive daily snapshots from 'mainline-wo-mergew' repo, as during that time it will contains kernels which package managers like DNF will considers newer. Users of the 'mainline-wo-mergew' copr during merge windows will likewise revive kernel from the 'stable-rc' or 'stable' repos, as those might contain newer versions with security fixes. And users of the ‘stable-rc’ copr will receive packages from the ‘stable’, ‘fedora-rc’ or ‘fedora’ coprs; that way users of 'stable-rc' copr won't be stuck on a -rc release with known problems fixed between the -rc and the final release. The 'example version sequence' column takes these effects into account.
 
Another note relevant for users of Fedora versions in development, e.g rawhide and beta releases: be aware that these coprs will not provide kernel versions older than the one the particular Fedora Linux uses by default, as doing so could lead to problems. Rawhide for example regularly uses latest mainline snapshots; that’s why rawhide users that have one of these repos enabled will receive vanilla mainline snapshots as well, even if they chose the ‘stable’ or ‘mainline-wo-mergew’ repos. Users of Fedora pre-releases (e.g. beta versions) might see similar effects, but once the Fedora version gets closer to its release things will start to work as advertised.


If you would like to permanently use kernels from these repos you might want to run one of these commands, depending on the type of kernels you want:
=== Install a kernel from the chosen copr ===
 
Enable the kernel vanilla copr you decided to use – for example the one shipping a kernel built from the latest 'mainline' code:


<pre>
<pre>
sudo dnf config-manager --set-enabled kernel-vanilla-mainline
sudo dnf -y copr enable @kernel-vanilla/mainline
sudo dnf config-manager --set-enabled kernel-vanilla-stable
</pre>
</pre>


That way dnf will automatically install the latest packages from those repositories when it updates your install the next time.
Now update your system to install the latest package from the copr:


Note: This TLDR-instructions focused on the two main repositories: mainline and stable. There are two more (called mainline-wo-mergew and fedora) for other use cases described below.
<pre>
sudo dnf upgrade 'kernel*'
</pre>


A few common questions about these repos are answered in the [[Kernel_Vanilla_Repositories-FAQ|FAQ]].
If you’re on a x86-64 (aka AMD64) system execute the following command as well:


== How to use, the verbose version ==
<pre>
mokutil --sb-state
</pre>


=== Configure the repositories ===
If it tells you ‘SecureBoot enabled’ you will have to turn it off either in your BIOS Setup or through a process initiated with <code>sudo mokutil --disable-validation</code>. That sadly is needed, as your system otherwise will reject booting any kernels from these repositories: it's technically impossible to sign the copr kernels with a key typical x86-64 systems will trust.


First download the repository definitions for DNF:
Once you booted your vanilla kernel you have two options:


<pre>
(1) In case you want to use the chosen copr regularly, be aware that for frequently updated kernel vanilla coprs like 'mainline' there is quite a risk that DNF misses the latest kernels and installs obsolete ones. To prevent that, tell DNF to check the kernel vanilla repositories more often than usual with a command like this one:
curl -s https://repos.fedorapeople.org/repos/thl/kernel-vanilla.repo | sudo tee /etc/yum.repos.d/kernel-vanilla.repo
 
<pre>
sudo sed -i 's!baseurl=https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/\(mainline\|stable-rc\|next\).*!&\nmetadata_expire=1h!g; s!baseurl=https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/\(stable\|fedora\)/.*!&\nmetadata_expire=3h!g;' /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_kernel-vanilla:*.repo
</pre>
</pre>


This will install a repo file with following repos:
(2) In case you installed a vanilla kernel just for a quick test, consider removing the just configured copr immediately, as explained in the next section. It also explains how to later uninstall packages installed from the kernel vanilla coprs, which is needed to ensure you immediately retrieve newly released kernels from Fedora again.
 
{| class="wikitable"
!style="width: 15%;"|repository
!style="width: 35%;"|description
!style="width: 30%;"|target users
!style="width: 15%;"|example versions
|- style="vertical-align:top;"
| kernel-vanilla-mainline
| a mainline kernel, which IOW is a pre-release or git-snapshot from Linux's main development branch
| those who want the latest mainline Linux
| 4.4, 4.5-rc0-git1, 4.5-rc1, 4.5-rc1-git2
|- style="vertical-align:top;"
| kernel-vanilla-mainline-wo-mergew
| similar to the kernel-vanilla-mainline repo, except during the merge window, when it will contain the latest released mainline kernel or a stable kernel based on it
| those who want the latest mainline kernel, but want to avoid development versions from the merge window – that the phase in the development cycle when the bulk of changes get merged for a new kernel version, which ends with the first pre-release, like 4.5-rc1
| 4.4, 4.4.1, 4.5-rc1, 4.5-rc1-git2
|- style="vertical-align:top;"
| kernel-vanilla-stable
| the latest stable kernel
| those who want the latest Linux stable kernel
| 4.4, 4.4.1, 4.4.2, 4.4.3
|- style="vertical-align:top;"
| kernel-vanilla-fedora
| contains a vanilla build of the latest kernel which Fedora currently ships or has in its update queue; most of the time this repository will contain the same kernels as kernel-vanilla-stable, except for times when Fedora hasn't yet jumped to the latest version line released from the mainline series.
| those who want to check if a vanilla kernel shows the same bug or behaviour as the Fedora kernel
| 4.3.12, 4.3.13, 4.4.3, 4.4.4
|}


Decide yourself which of those you want to use. The following examples assume you want to use the <code>
=== Remove the kernel vanilla repositories and kernels installed from them ===
kernel-vanilla-mainline</code> repository, hence if you want to use another repository you'll need to adjust the commands accordingly.


=== Install a kernel from the repository ===
Disable any kernel vanilla copr you enabled:


Run this command to install the latest kernel from the kernel vanilla mainline repo:
<pre>
<pre>
sudo dnf --enablerepo=kernel-vanilla-mainline update
dnf copr list | grep 'group_kernel-vanilla' | xargs -r sudo dnf copr remove
</pre>
</pre>


Alternatively you can permanently enable that repository to make DNF automatically install new kernel packages when updating the system:
Now downgrade the kernel and a few related packages to the latest versions Fedora provides:


<pre>
<pre>
sudo dnf config-manager --set-enabled kernel-vanilla-mainline
sudo dnf --refresh distrosync bpftool 'kernel*' 'libperf*' perf python3-perf rtla rv
sudo dnf update
</pre>
</pre>


When you install a kernel from the repository for the first time DNF will ask you if you trust the [https://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD7927A2FCC9DBCAB public key] that is used to verify the signature of the packages from the kernel vanilla repositories. It will look like this:
It's not strictly required, but highly recommended to boot into the latest official Fedora kernel now. To do so, restart and choose the top-most kernel from the boot menu that does not have 'vanilla' in the name.
 
Now remove all kernels installed from the kernel vanilla coprs:
 
<pre>
<pre>
Retrieving key from https://repos.fedorapeople.org/repos/thl/RPM-GPG-KEY-knurd-kernel-vanilla
rpm -qa 'kernel' 'kernel*core*' 'kernel*modules*' 'kernel*devel*' | grep '.vanilla' | xargs -r sudo dnf remove
Importing GPG key 0x863625FA:
Userid    : "Thorsten Leemhuis (Key for signing vanilla kernel rpms) <fedora@leemhuis.info>"
Fingerprint: 7C71 B4C9 BF71 7876 635F 3205 4534 BEED 8636 25FA
From      : https://repos.fedorapeople.org/repos/thl/RPM-GPG-KEY-knurd-kernel-vanilla
Is this ok [y/N]:
</pre>
</pre>


Dnf will proceed once you acknowledge this.  
If you disabled UEFI Secure Boot, you might want to turn it on again using the path you took to disable it, e.g. either through your BIOS Setup or a process initiated with <code>sudo mokutil --enable-validation</code>.


= Important notes =
From now on your system will behave like one that never had these repositories enabled or kernels installed from it.


Please be aware that
== Instructions for Fedora Atomic variants ==


* none of the developers that maintain the Fedora kernel is involved in the maintenance of the Fedora kernel vanilla repositories
'' '''Important note''': the following instructions only work as intended for the @kernel-vanilla coprs 'fedora' and 'next', as those are stand alone and do not depend on other coprs. The instructions most of the time will do the right thing on 'mainline-wo-mergew' copr as well; but with the other @kernel-vanilla coprs the system will often install and remain on obsolete kernel versions for a few days (in case of 'stable-rc') or quite a few weeks ('stable' and 'mainline' ). That's because the latest versions suitable for users of those coprs in about 60 to 90 percent of the time is distributed through a higher level copr (the note under the table above explains this scheme in more detail). DNF automatically uses the latter, but [https://github.com/coreos/rpm-ostree/issues/4708 to our knowledge does not enable other repository a copr depends on].''
* most systems work better and run in a more secure manner with the official Fedora kernels
* if you don't understand what above commands do then you likely should not use these repositories or its packages


= More details about the kernel vanilla repos =
Use the following commands to install the latest kernel from the 'mainline-wo-mergew' copr on Fedora Atomic Desktops like Silverblue or Kinoite:


== What Linux kernel versions do the various branches currently contain? ==
<pre>
copr="mainline-wo-mergew"
curl -s "https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/${copr}/repo/fedora-rawhide/group_kernel-vanilla-${copr}-fedora-rawhide.repo" | sudo tee "/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_kernel-vanilla:${copr}.repo"
sudo rpm-ostree override replace --experimental --from repo="copr:copr.fedorainfracloud.org:group_kernel-vanilla:${copr}" kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra
</pre>


Look at [http://www.leemhuis.info/files/kernel-vanilla/repostatus.txt the file repostatus.txt] or execute the following script to query the latest status locally:
To later remove the kernel vanilla packages and the repository configuration, run the following commands:


<pre>
<pre>
releases="34 33 32"; \
sudo rpm-ostree override reset kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra
branches="mainline mainline-wo-mergew stable fedora"; \
sudo rm "/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_kernel-vanilla"*
for branch in ${branches} ; do for release in ${releases} ; do
  queryresult=$(dnf repoquery --repofrompath=repo,http://repos.fedorapeople.org/repos/thl/kernel-vanilla-${branch}/fedora-${release}/x86_64/ --disablerepo=* --enablerepo=repo --available --latest-limit=1 -q kernel 2>/dev/null)
  echo "${branch} ${release} ${queryresult:-not_available}"
done; done | column -t | sed 's!kernel-0:!!; s!.x86_64!!;'
</pre>
</pre>


== Who is behind this effort?  ==
== How vanilla kernels compare to Fedora’s ==
 
Most of the time kernels from the kernel vanilla coprs will work roundabout as well and secure as Fedora’s. Sometimes though the kernels from these repositories will work better, as they contain drivers or security fixes that haven’t reached the kernel used by Fedora Linux yet; other times it's the other way around, as Fedora sometimes includes fixes that upstream hasn't picked up yet. Those differences rarely matter much.


Right now the kernel vanilla repositories for Fedora are maintained by [[user:thl|Thorsten Leemhuis (aka "knurd")]] only. Maybe over time people join to help, that's why this text is written as if a team is keeping care of the repositories.
== Empty or apparently outdated coprs are normal ==


== How can I uninstall all kernels from the kernel vanilla repositories ==
Please be aware that at least one and up to three out of the seven kernel vanilla coprs will always look empty or outdated when you looks at the copr web interface or straight at the package repositories. That is totally normal, as it will look like that when the most recent build suitable for users of that copr is found in one of the other copr included as a runtime dependency; the note under above table explains this in more detail.
 
== Linux kernel versions currently offered ==
 
The repositories provide packages with a regular kernel (e.g. kernel, kernel-core, kernel-modules, …) for arm64/aarch64, ppc64le, and x86_64; all coprs that ship 6.12-pre or later also provide realtime/PREEMPT_RT packages (e.g. kernel-rt, kernel-rt-core, kernel-rt-modules, …) for arm64/aarch64 and x86_64.
 
A '''[https://www.leemhuis.info/files/kernel-vanilla/repostatus.txt repostatus file shows the versions the various coprs currently provide]'''. Alternatively, execute the following script to query the latest versions locally:


Boot into a stock Fedora kernel and run
<pre>
<pre>
sudo dnf remove $(rpm -qa 'kernel*' | grep '.vanilla.knurd' )
dists=(40 41 rawhide)
dnf clean all > /dev/null
for repo in fedora{,-rc} fedora stable {fedora,stable}-rc mainline{-wo-mergew,} next; do
    [[ "${repo}" =~ (fedora|next)$ ]] && unset repostring
    repostring="${repostring} --repofrompath=kvr-${repo},https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/${repo}/fedora-\${distro}-x86_64/"
    ( [[ "${repo}" =~ (fedora|fedora-rc) ]] && [[ "${fedorarc_done}" ]] ) && continue
    for distro in ${dists[*]} ; do
        queryresult="$(eval dnf repoquery --quiet ${repostring} --disablerepo=* --enablerepo=kvr-* --latest-limit=1 -q kernel --arch x86_64 --qf '%{version}-%{release}')"
    printf '%-20s %-10s %s\n' "${repo}" "${distro}" "${queryresult:-lookup failed}"
    done
    [[ "${repo}" == fedora-rc ]] && fedorarc_done="TRUE"
done
</pre>
</pre>
Dnf will then show what is about to get uninstalled; review that list carefully and make sure you still have a none vanilla kernel on your system, otherwise you loose the ability to boot your installation. Better abort if something looks fishy. 


== What is the goal of these repositories? Are these kernels as good as those Fedora provides? ==
== Developers behind the effort and point of contact  ==
 
The Linux kernel vanilla repositories for Fedora are maintained by [[user:thl|Thorsten Leemhuis (aka "knurd")]] since [https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org/message/NNSLWMKQSGALKX7VGWATKWTGAOU6LZ5I/ late 2012]. The packages they provide are built using a RPM spec file that is nearly identical to the one used to build Fedora’s kernel; the build environment is basically identical, too. Note though that none of the maintainers of the official Fedora Linux kernel are involved in the maintenance of these repositories.


These and many other questions are [[Kernel_Vanilla_Repositories-FAQ|answered in the FAQ about the kernel vanilla repositories]].
For any feedback or questions regarding the kernel vanilla repositories contact [[user:thl|Thorsten Leemhuis (aka "knurd")]].


= ToDo list =
== What’s the goal of these repositories? And are these kernels as good as Fedora’s? ==


* switch to kernel-ark as base
These and many other questions are answered in the [[Kernel_Vanilla_Repositories-FAQ|FAQ about the Linux kernel vanilla repositories for Fedora Linux]].
* create stable-rc repo
* maybe ship debuginfo packages
* automate builds fully to keep repos more up2date
* maybe enable some of the staging drivers Fedora avoids

Latest revision as of 08:00, 9 January 2025

Linux vanilla kernel repositories for Fedora Linux

The kernel vanilla repositories allow you to quickly, comfortably, and cleanly install the latest upstream Linux kernel versions on Fedora Linux. Seven 'coprs' offer various ready-to-use kernel packages built from upstream Linux series like ‘mainline’ and ‘stable’. The provided RPMs are ideal for both quick tests and regular day-to-day use.

To simply install the latest kernel version indented for end users, follow the instructions in the next section, which provides a quick start; for kernels from mainline and other series, scroll down a bit further to 'Detailed instructions for installing and uninstalling vanilla kernel packages'. Note, both sections are meant for users of Fedora variants like Workstation, Server, or KDE Plasma Desktop; in case you are using a Fedora Atomic variant like Silverblue or Kinoite, head over to 'Instructions for Fedora Atomic variants'.

Install the newest Linux version

To install the latest Linux kernel version meant for regular end users run the following commands:

sudo dnf -y copr enable @kernel-vanilla/stable
sudo dnf upgrade 'kernel*'
mokutil --sb-state

The first two commands enable the ‘stable’ copr, from which DNF then will install the newest proper mainline kernel release (say 6.1) or the latest version from a stable series derived from it (e.g. 6.1.1, 6.1.2, …). The third command will tell you if UEFI Secure Boot is active on your system. If that's the case you have to either disable it in your system's BIOS Setup or through a process initiated through mokutil --disable-validation; that's required, as your firmware will otherwise reject booting kernels installed from these repositories.

Detailed instructions for installing and uninstalling vanilla kernel packages

The following two sub-section describe how to chose an kernel vanilla copr for your use case and install a kernel from it; a third sub-section explains how to later remove the copr and kernels installed from.

Choosing a kernel vanilla copr appropriate for your needs

Use the following table to decide which of the seven @kernel-vanilla coprs ('fedora', 'fedora-rc', 'stable', 'stable-rc', 'mainline-wo-mergew', 'mainline', or 'next') provides the kernels you want to use. To query the versions currently shipped by each of these coprs, check out the repostatus file.

copr provided kernels example version sequence target users
@kernel-vanilla/fedora The latest kernel version from the series the relevant Fedora Linux release currently uses or will likely receive within a few days; for stable releases of Fedora Linux this is the latest stable series or its predecessor. …, 6.0.18,
6.0.19,
6.1.5,
6.1.6, …
This allows checking if a bug that happens with Fedora's kernel also occurs with the latest upstream version from the same kernel series – or the one that Fedora Linux release will retrieve within days.
@kernel-vanilla/fedora-rc Pre-releases of the next release from the stable series the relevant Fedora Linux release currently uses or will likely receive within a few days; for stable releases of Fedora Linux this is the latest stable series or its predecessor. …, 6.0.18,
6.0.19-rc1,
6.0.19,
6.1.5-rc1,
6.1.5, …
Anyone who wants to help testing Linux kernel version from the latest stable series or its predecessor about to be released.
@kernel-vanilla/stable The latest kernel version meant for regular end users; usually this is the newest version from the latest stable series, occasionally the latest mainline release. …, 6.0.15,
6.1,
6.1.1,
6.1.2, …
Anyone who wants the latest and greatest kernel intended for regular users.
@kernel-vanilla/stable-rc Pre-releases of the next release from the latest stable series. …, 6.0.15-rc1,
6.0.15,
6.1,
6.1.1-rc1,
6.1.1, …
Anyone who wants to help testing Linux kernel version from the latest stable series about to be released.
@kernel-vanilla/mainline-wo-mergew The latest mainline kernel, either built from a pre-release (aka "rc kernel") or a Git snapshot of the day – albeit the latter only after -rc1 was released. …, 6.1-rc8-20221211,
6.1,
6.1.1-rc1,
6.1.1,
6.2-rc1,
6.2-rc1-20221226, …
Anyone who wants to run a kernel built from the latest Linux codebase, except when mainline is in a 'merge window' – that is the phase right after a new mainline release (say 6.1) when the bulk of changes (including all riskier ones!) are merged for the next mainline version; this phase ends after two weeks with the publication of the next mainline kernel's first pre-release (e.g. 6.2-rc1).
@kernel-vanilla/mainline The latest mainline kernel build from a Git snapshot of the day. …, 6.1-rc8-20221211,
6.1,
6.2-rc0-20221213,
6.2-rc0-20221214, …
Anyone who wants to run kernels built from the latest Linux codebase.
@kernel-vanilla/next Linux-next kernels. …, 6.1-0.0.next.20221209,
6.2-0.0.next.20221212,
6.2-0.0.next.20221213, …
Anyone who wants to run linux-next or test if the changes slated for inclusion in the next mainline cycle fix a problem.

Note, only the coprs ‘fedora’ and ‘next’ are stand-alone. The other five each include other coprs as a runtime dependency; usually it are those mentioned earlier in the table, except that the ‘fedora-rc’ copr is not a dependency of the ‘stable’ copr.

Users of the 'mainline' copr thus outside of merge windows will receive daily snapshots from 'mainline-wo-mergew' repo, as during that time it will contains kernels which package managers like DNF will considers newer. Users of the 'mainline-wo-mergew' copr during merge windows will likewise revive kernel from the 'stable-rc' or 'stable' repos, as those might contain newer versions with security fixes. And users of the ‘stable-rc’ copr will receive packages from the ‘stable’, ‘fedora-rc’ or ‘fedora’ coprs; that way users of 'stable-rc' copr won't be stuck on a -rc release with known problems fixed between the -rc and the final release. The 'example version sequence' column takes these effects into account.

Another note relevant for users of Fedora versions in development, e.g rawhide and beta releases: be aware that these coprs will not provide kernel versions older than the one the particular Fedora Linux uses by default, as doing so could lead to problems. Rawhide for example regularly uses latest mainline snapshots; that’s why rawhide users that have one of these repos enabled will receive vanilla mainline snapshots as well, even if they chose the ‘stable’ or ‘mainline-wo-mergew’ repos. Users of Fedora pre-releases (e.g. beta versions) might see similar effects, but once the Fedora version gets closer to its release things will start to work as advertised.

Install a kernel from the chosen copr

Enable the kernel vanilla copr you decided to use – for example the one shipping a kernel built from the latest 'mainline' code:

sudo dnf -y copr enable @kernel-vanilla/mainline

Now update your system to install the latest package from the copr:

sudo dnf upgrade 'kernel*'

If you’re on a x86-64 (aka AMD64) system execute the following command as well:

mokutil --sb-state

If it tells you ‘SecureBoot enabled’ you will have to turn it off either in your BIOS Setup or through a process initiated with sudo mokutil --disable-validation. That sadly is needed, as your system otherwise will reject booting any kernels from these repositories: it's technically impossible to sign the copr kernels with a key typical x86-64 systems will trust.

Once you booted your vanilla kernel you have two options:

(1) In case you want to use the chosen copr regularly, be aware that for frequently updated kernel vanilla coprs like 'mainline' there is quite a risk that DNF misses the latest kernels and installs obsolete ones. To prevent that, tell DNF to check the kernel vanilla repositories more often than usual with a command like this one:

sudo sed -i 's!baseurl=https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/\(mainline\|stable-rc\|next\).*!&\nmetadata_expire=1h!g; s!baseurl=https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/\(stable\|fedora\)/.*!&\nmetadata_expire=3h!g;' /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_kernel-vanilla:*.repo

(2) In case you installed a vanilla kernel just for a quick test, consider removing the just configured copr immediately, as explained in the next section. It also explains how to later uninstall packages installed from the kernel vanilla coprs, which is needed to ensure you immediately retrieve newly released kernels from Fedora again.

Remove the kernel vanilla repositories and kernels installed from them

Disable any kernel vanilla copr you enabled:

dnf copr list | grep 'group_kernel-vanilla' | xargs -r sudo dnf copr remove

Now downgrade the kernel and a few related packages to the latest versions Fedora provides:

sudo dnf --refresh distrosync bpftool 'kernel*' 'libperf*' perf python3-perf rtla rv

It's not strictly required, but highly recommended to boot into the latest official Fedora kernel now. To do so, restart and choose the top-most kernel from the boot menu that does not have 'vanilla' in the name.

Now remove all kernels installed from the kernel vanilla coprs:

rpm -qa 'kernel' 'kernel*core*' 'kernel*modules*' 'kernel*devel*' | grep '.vanilla' | xargs -r sudo dnf remove

If you disabled UEFI Secure Boot, you might want to turn it on again using the path you took to disable it, e.g. either through your BIOS Setup or a process initiated with sudo mokutil --enable-validation.

From now on your system will behave like one that never had these repositories enabled or kernels installed from it.

Instructions for Fedora Atomic variants

Important note: the following instructions only work as intended for the @kernel-vanilla coprs 'fedora' and 'next', as those are stand alone and do not depend on other coprs. The instructions most of the time will do the right thing on 'mainline-wo-mergew' copr as well; but with the other @kernel-vanilla coprs the system will often install and remain on obsolete kernel versions for a few days (in case of 'stable-rc') or quite a few weeks ('stable' and 'mainline' ). That's because the latest versions suitable for users of those coprs in about 60 to 90 percent of the time is distributed through a higher level copr (the note under the table above explains this scheme in more detail). DNF automatically uses the latter, but to our knowledge does not enable other repository a copr depends on.

Use the following commands to install the latest kernel from the 'mainline-wo-mergew' copr on Fedora Atomic Desktops like Silverblue or Kinoite:

copr="mainline-wo-mergew"
curl -s "https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/${copr}/repo/fedora-rawhide/group_kernel-vanilla-${copr}-fedora-rawhide.repo" | sudo tee "/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_kernel-vanilla:${copr}.repo"
sudo rpm-ostree override replace --experimental --from repo="copr:copr.fedorainfracloud.org:group_kernel-vanilla:${copr}" kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra

To later remove the kernel vanilla packages and the repository configuration, run the following commands:

sudo rpm-ostree override reset kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra
sudo rm "/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_kernel-vanilla"*

How vanilla kernels compare to Fedora’s

Most of the time kernels from the kernel vanilla coprs will work roundabout as well and secure as Fedora’s. Sometimes though the kernels from these repositories will work better, as they contain drivers or security fixes that haven’t reached the kernel used by Fedora Linux yet; other times it's the other way around, as Fedora sometimes includes fixes that upstream hasn't picked up yet. Those differences rarely matter much.

Empty or apparently outdated coprs are normal

Please be aware that at least one and up to three out of the seven kernel vanilla coprs will always look empty or outdated when you looks at the copr web interface or straight at the package repositories. That is totally normal, as it will look like that when the most recent build suitable for users of that copr is found in one of the other copr included as a runtime dependency; the note under above table explains this in more detail.

Linux kernel versions currently offered

The repositories provide packages with a regular kernel (e.g. kernel, kernel-core, kernel-modules, …) for arm64/aarch64, ppc64le, and x86_64; all coprs that ship 6.12-pre or later also provide realtime/PREEMPT_RT packages (e.g. kernel-rt, kernel-rt-core, kernel-rt-modules, …) for arm64/aarch64 and x86_64.

A repostatus file shows the versions the various coprs currently provide. Alternatively, execute the following script to query the latest versions locally:

dists=(40 41 rawhide)
dnf clean all > /dev/null
for repo in fedora{,-rc} fedora stable {fedora,stable}-rc mainline{-wo-mergew,} next; do
    [[ "${repo}" =~ (fedora|next)$ ]] && unset repostring
    repostring="${repostring} --repofrompath=kvr-${repo},https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/${repo}/fedora-\${distro}-x86_64/"
    ( [[ "${repo}" =~ (fedora|fedora-rc) ]] && [[ "${fedorarc_done}" ]] ) && continue
    for distro in ${dists[*]} ; do
        queryresult="$(eval dnf repoquery --quiet ${repostring} --disablerepo=* --enablerepo=kvr-* --latest-limit=1 -q kernel --arch x86_64 --qf '%{version}-%{release}')"
   	   printf '%-20s %-10s %s\n' "${repo}" "${distro}" "${queryresult:-lookup failed}"
    done
    [[ "${repo}" == fedora-rc ]] && fedorarc_done="TRUE"
done

Developers behind the effort and point of contact

The Linux kernel vanilla repositories for Fedora are maintained by Thorsten Leemhuis (aka "knurd") since late 2012. The packages they provide are built using a RPM spec file that is nearly identical to the one used to build Fedora’s kernel; the build environment is basically identical, too. Note though that none of the maintainers of the official Fedora Linux kernel are involved in the maintenance of these repositories.

For any feedback or questions regarding the kernel vanilla repositories contact Thorsten Leemhuis (aka "knurd").

What’s the goal of these repositories? And are these kernels as good as Fedora’s?

These and many other questions are answered in the FAQ about the Linux kernel vanilla repositories for Fedora Linux.