From Fedora Project Wiki

No edit summary
 
(117 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Linux kernel vanilla repositories for Fedora Linux =
= Linux kernel vanilla repositories for Fedora Linux =


The [https://copr.fedorainfracloud.org/groups/g/kernel-vanilla/coprs/ kernel vanilla kernel repositories] allow you to quickly, comfortably, and cleanly install the latest Linux kernels on Fedora Linux. Versions from various Linux series are available, among them: the latest ‘mainline’ kernel, the newest ‘stable’ release, or the latest version from the kernel series currently used by Fedora Linux. These kernels are perfect for both quick tests and regular day-to-day use.
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/ Six '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.


{{admon/warning|The kernel vanilla repositories after 10 years recently moved from repos.fedorapeople.org to copr!|To migrate, just delete the old .repo file in /etc/yum.repos.d/ and add the copr of choice as described on this page. For more details see [https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org/message/UWIEWCDBMCEAOCGFFTE7VCDL3QM7WSX6/ this announcement]. Sorry for the inconvenience.}}
To install the latest kernel version deemed for end users, follow the instructions in the next section. For various other use cases, head over to the second section below to check which of the six coprs provides the Linux kernels you want; then enable the selected copr and install its latest kernel as explained in the third section. When you later want to remove the kernel vanilla repositories and all packages retrieved from them, consult the fourth section.


== Linux kernels series offered in the repositories ==
Note, the instructions in those sections are meant for users of Fedora variants like Workstation, Server, or KDE Plasma Desktop. Fedora Atomic Desktops like Silverblue or Kinoite need different commands described in a fifth section below.
 
== Install the latest Linux version meant for end users ==
 
To install the latest Linux kernel meant for regular end users run the following commands:
 
<pre>
sudo dnf -y copr enable @kernel-vanilla/stable
sudo dnf upgrade kernel
mokutil --sb-state
</pre>
 
The first two commands enable the ‘stable’ copr, which then is used via DNF to install the latest mainline kernel (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.
 
== Linux kernels offered in the six kernel vanilla coprs ==
 
The kernel vanilla repositories for Fedora Linux provide six @kernel-vanilla coprs to serve different use-cases. Use the following table to decide which of them you want to use: ‘[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/fedora/ fedora]’, ‘[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/stable/ stable]’, ‘[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/stable-rc/ stable-rc]’, ‘[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/mainline-wo-mergew/ mainline-wo-mergew]’, ‘[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/mainline/ mainline]’, or ‘[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/next/ next]’.


{| class="wikitable"
{| class="wikitable"
!style="width: 17%;"|[https://copr.fedorainfracloud.org/groups/g/kernel-vanilla/coprs/ repository]
!style="width: 17%;"|@kernel-vanilla copr
!style="width: 30%;"|description
!style="width: 30%;"|provides
!style="width: 30%;"|target users
!style="width: 13%;"|example version sequence
!style="width: 23%;"|example version sequence
!style="width: 40%;"|target users
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/fedora/ fedora]'''
| vanilla kernels from the stable series the latest Fedora Linux currently uses
| anyone who wants to check if vanilla kernels shows the same bug or behavior as the latest Fedora kernel
| …, 6.0.18, 6.0.19, 6.1.5, 6.1.6, …
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/stable/ stable]'''
| '''fedora'''
| the latest stable kernel according to the frontpage of kernel.org; this repo thus won't ship mainline releases like 6.1 and only jumps to a newer series once its first stable release (e.g. 6.1.1) is published
| The latest kernel version from the stable series the latest Fedora Linux release currently uses.
| anyone who wants the latest Linux stable kernel
| …, 6.0.18,<br>6.0.19,<br>6.1.5,<br>6.1.6, …
| …, 6.0.14, 6.0.15, 6.1.1, 6.1.2, 6.1.3, …
| This is mainly meant for users that want to check if a bug that happens with Fedora's kernel also occurs with the latest upstream version from the same kernel series.
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/stable-rc/ stable-rc]'''
| '''stable'''
| pre-releases of the next stable release
| 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.
| anyone who wants to help testing future Linux stable kernels
| …, 6.0.15,<br>6.1,<br>6.1.1,<br>6.1.2, …
| …, 6.0.14, 6.0.15-rc1, 6.0.15, 6.1.1-rc1, 6.1.1, …
| Anyone who wants the latest and greatest kernel.
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/mainline-wo-mergew/ mainline-wo-mergew]'''
| '''stable-rc'''
| identical to the ‘mainline’ repositories, but steers clear of git snapshots during merge windows
| Pre-releases of the next release from the latest stable series.
| anyone who normally wants the latest mainline kernel, but wants to play it a bit safer by avoiding mainline during merge windows; that's the phase at the beginning of a development cycle where the bulk of changes (~85 percent) are merged for the next mainline release before its first pre-release (e.g. a “-rc1") is published
| …, 6.0.15-rc1,<br>6.0.15,<br>6.1,<br>6.1.1-rc1,<br>6.1.1, …
| …, 6.1-rc8-20221211, 6.1, 6.1.1-rc1, 6.1.1, 6.2-rc1, 6.2-rc1-20221226, 6.2-rc1-20221227, …
| Anyone who wants to help testing Linux kernels from the latest stable series about to be released.
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/mainline/ mainline]'''
| '''mainline-wo-mergew'''
| mainline kernels, either built from a proper release, a pre-release (aka "rc kernel"), or a git snapshot
| 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.
| anyone who wants to run a kernel built from the the latest Linux codebase
| …, 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, …
| …, 6.1-rc8-20221211, 6.1, 6.2-rc0-20221213, 6.2-rc0-20221214, 6.2-rc0-20221215, …
| 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;"
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/next/ next]'''
| '''mainline'''
| linux-next kernels; use at your own risk!
| The latest mainline kernel build from a Git snapshot of the day.
| anyone who wants to run linux-next or test if the changes slated for inclusion in the next mainline cycle fix a problem
| …, 6.1-rc8-20221211,<br>6.1,<br>6.2-rc0-20221213,<br>6.2-rc0-20221214, …
| …, 6.1-0.0.next.20221210, 6.1-0.0.next.20221211,6.1-0.0.next.20221213, …
| Anyone who wants to run kernels built from the latest Linux codebase.
|- style="vertical-align:top;"
|- style="vertical-align:top;"
|colspan="4"| '''Note''': each of those repositories includes all the ones mentioned earlier in the table as runtime dependency, except the next repository, which is stand-alone. Users of the ‘stable-rc’ repository thus will receive packages from the ‘stable’ or ‘fedora’ repositories when they ship kernel packages which package managers will consider newer; this will ensure users of stable-rc won’t be stuck on a kernel with known problems that were fixed between the release of the rc and the final version.
| '''next'''
<br>
| Linux-next kernels.
Also, be aware that none of these repositories will provide kernels older than those the particular Fedora release uses by default, as that could lead to problems. That aspect is mainly relevant for Fedora versions in development (IOW: rawhide and beta releases). Rawhide for example regularly uses the latest mainline builds; that’s why users of rawhide that have one of these repos enabled will receive vanilla mainline builds all the time, even if they chose the ‘stable’ or ‘mainline-wo-mergew’ repos. Users of pre-releases like a beta might see similar effects (but won’t get kernels from the merge window, unless the beta includes them, which would be quite unusual). Once a Fedora version under development gets closer to its final release everything will start to work as advertised.
| …, 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.
|}
|}


== How to install a vanilla kernel from these repositories ==
'''Note''', only the coprs ‘fedora’ and ‘next’ are stand-alone; the other four each include coprs mentioned earlier in the table as a runtime dependency. Users of the ‘stable-rc’ copr thus will receive packages from the ‘stable’ or ‘fedora’ coprs when the latter contain kernels which package managers like DNF will considers newer. 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; users of the 'mainline' repo will also receive daily snapshots from 'mainline-wo-mergew' repo once the merge window ended. 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 release uses by default, as doing so could lead to problems. Rawhide for example regularly uses the 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’re on a x86 system, first run <code>mokutil --sb-state</code> to check whether UEFI Secure Boot is active on your system. If that’s the case you have to turn it off either in your BIOS Setup or through a process initiated with <code>mokutil --disable-validation</code>; do not omit this, as the kernels from these repositories won’t boot otherwise, because they are not signed with a key typical x86 systems trust.
== How to install a kernel from the vanilla repositories ==


Now enable one of the kernel vanilla repositories and update your system. The following commands for example will install the latest mainline kernel:
First enable the kernel vanilla copr you want to use – for example the one shipping a kernel built from the latest mainline code:


<pre>
<pre>
sudo dnf -y copr enable @kernel-vanilla/mainline
sudo dnf -y copr enable @kernel-vanilla/mainline
sudo dnf upgrade 'kernel*'
</pre>
</pre>


In case you want that vanilla kernel just for a quick test, run <code>sudo dnf copr remove @kernel-vanilla/mainline</code> right afterwards to remove the repository again. Later when you’ve finished your tests, reboot and choose the latest stock Fedora Linux kernel from the boot menu; then uninstall all packages from the kernel vanilla repositories using <code>sudo dnf remove $(rpm -qa 'kernel*' | grep '.vanilla' )</code> to ensure retrieving kernel updates from Fedora again.
Now update your system to install the latest package from the copr:
 
<pre>
sudo dnf upgrade kernel kernel-devel
</pre>
 
If you’re on a x86-64 (aka AMD64) system execute the following command as well:
 
<pre>
mokutil --sb-state
</pre>
 
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 kernels in copr 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:
 
<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>
 
(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 retrieve newly released kernels from Fedora again.
 
== How to remove the kernel vanilla repositories and uninstall kernels installed from them ==
 
Disable any kernel vanilla copr you enabled:
 
<pre>
dnf copr list | grep 'group_kernel-vanilla' | xargs -r sudo dnf copr remove
</pre>
 
Now downgrade the kernel and a few related packages to the latest versions Fedora provides:
 
<pre>
sudo dnf --refresh distrosync bpftool 'kernel*' 'libperf*' perf python3-perf rtla rv
</pre>
 
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.


In case you want to use these repositories regularly, consider advising dnf to check for new packages more often than usual – for example by running the following command, which advices dnf to query frequently updated repositories every hour and less often updated repositories every four hours:
Now remove all kernels installed from the kernel vanilla coprs:


<pre>
<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=4h!g;' /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:group_kernel-vanilla:*.repo
rpm -qa 'kernel' 'kernel*core*' 'kernel*modules*' 'kernel*devel*' | grep '.vanilla' | xargs -r sudo dnf remove
</pre>
 
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 a process initiated with <code>sudo mokutil --enable-validation</code>.
 
From now on your system will behave like one that never had these repositories enabled or kernels installed from it.
 
== Instructions for Fedora Atomic Desktops ==
 
'' '''Important note''': the following instructions only work as intended for the @kernel-vanilla coprs 'fedora' and 'next', as those are the only ones that are stand alone. The instructions most of the time will do the right thing on 'mainline-wo-mergew' copr as well; but with the @kernel-vanilla coprs 'stable', 'stable-rc', and 'mainline' they will often install an obsolete kernel and remain on it. That's because the latest versions suitable for users of those coprs in about 50 to 80 percent of the time is distributed through a higher level copr the repo files for those coprs enable as coprdep. The note under the table above explains this scheme in more detail. This approach works well with DNF, but [https://github.com/coreos/rpm-ostree/issues/4708 to our knowledge is unsupported by 'rpm-ostree overlay'], as it ignores the coprdep repos.''
 
Use the following commands to install the latest kernel from the 'mainline-wo-mergew' copr on Fedora Atomic Desktops like Silverblue or Kinoite:
 
<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>
 
To later remove the kernel vanilla packages and the repository configuration, run the following commands:
 
<pre>
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"*
</pre>
</pre>


== How vanilla kernels compare to Fedora’s ==
== How vanilla kernels compare to Fedora’s ==


Most of the time these kernels 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 kernels used by Fedora Linux yet; but then again other times it’s just the other way around.
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.


== It’s normal that some repositories are empty or look abandoned ==
== Empty or apparently coprs are normal ==


Please be aware that quite a few of the repositories will look outdated, abandoned, or empty when you check for recent builds in copr’s web interface or look straight at a repository. But be assured, most likely everything is well and working as intended. It will look like that when the most recent build suitable for users of that repository is found in one of the other repositories included as a runtime dependency (see the footnote in above table for details).
Please be aware that at least one and up to three out of the six kernel vanilla coprs will always look empty or outdated when you check copr’s web interface or look 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. See the note under above table for a more detailed explanation.


== Linux kernel versions currently offered ==
== Linux kernel versions currently offered ==


The file '''[https://www.leemhuis.info/files/kernel-vanilla/repostatus.txt www.leemhuis.info/files/kernel-vanilla/repostatus.txt shows what the repositories currently provide]'''.
A '''[https://www.leemhuis.info/files/kernel-vanilla/repostatus.txt repostatus file shows what the repositories currently provide]'''. Alternatively, execute the following script to query the latest packages locally:
 
Or execute the following script to query the latest packages locally:


<pre>
<pre>
dists=(36 37 rawhide)
dists=(38 39 40 rawhide)
dnf clean all > /dev/null
dnf clean all > /dev/null
for repo in fedora stable{,-rc} mainline{-wo-mergew,} next; do
for repo in fedora stable{,-rc} mainline{-wo-mergew,} next; do
    repostring="${repostring} --repofrompath=kvr-${repo},https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/${repo}/fedora-\${distro}-x86_64/"
[[ ${repo} =~ (fedora|next) ]] && unset repostring
    for distro in ${dists[*]} ; do
repostring="${repostring} --repofrompath=kvr-${repo},https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/${repo}/fedora-\${distro}-x86_64/"
  queryresult="$(eval dnf repoquery ${repostring} --disablerepo=* --enablerepo=kvr-* --latest-limit=1 -q kernel --arch x86_64 --qf '%{version}-%{release}')"
for distro in ${dists[*]} ; do
    printf '%-20s %-10s %s\n' ${repo} ${distro} ${queryresult:-lookup failed}
    queryresult="$(eval dnf repoquery ${repostring} --disablerepo=* --enablerepo=kvr-* --latest-limit=1 -q kernel --arch x86_64 --qf '%{version}-%{release}')"
    done
  printf '%-20s %-10s %s\n' "${repo}" "${distro}" "${queryresult:-lookup failed}"
done
done
done
</pre>
</pre>
Line 95: Line 168:
== Developers behind the effort and point of contact  ==
== Developers behind the effort and point of contact  ==


The kernel vanilla repositories are maintained primarily by [[user:thl|Thorsten Leemhuis (aka "knurd")]]; the SRPMs are pretty close to those used to build Fedora’s kernel, but its maintainers are not involved in the maintenance of these repositories.
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 build using a RPM spec file that is nearly identical to the one used to build Fedora’s kernel. Note though that none of the maintainers of the the official Fedora Linux kernel are involved in the maintenance of these repositories.


For any feedback or questions regarding the kernel vanilla repositories contact [[user:thl|Thorsten Leemhuis (aka "knurd")]].
For any feedback or questions regarding the kernel vanilla repositories contact [[user:thl|Thorsten Leemhuis (aka "knurd")]].

Latest revision as of 06:16, 15 April 2024

Linux kernel vanilla 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. Six '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 install the latest kernel version deemed for end users, follow the instructions in the next section. For various other use cases, head over to the second section below to check which of the six coprs provides the Linux kernels you want; then enable the selected copr and install its latest kernel as explained in the third section. When you later want to remove the kernel vanilla repositories and all packages retrieved from them, consult the fourth section.

Note, the instructions in those sections are meant for users of Fedora variants like Workstation, Server, or KDE Plasma Desktop. Fedora Atomic Desktops like Silverblue or Kinoite need different commands described in a fifth section below.

Install the latest Linux version meant for end users

To install the latest Linux kernel 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, which then is used via DNF to install the latest mainline kernel (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.

Linux kernels offered in the six kernel vanilla coprs

The kernel vanilla repositories for Fedora Linux provide six @kernel-vanilla coprs to serve different use-cases. Use the following table to decide which of them you want to use: ‘fedora’, ‘stable’, ‘stable-rc’, ‘mainline-wo-mergew’, ‘mainline’, or ‘next’.

@kernel-vanilla copr provides example version sequence target users
fedora The latest kernel version from the stable series the latest Fedora Linux release currently uses. …, 6.0.18,
6.0.19,
6.1.5,
6.1.6, …
This is mainly meant for users that want to check if a bug that happens with Fedora's kernel also occurs with the latest upstream version from the same kernel series.
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.
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 kernels from the latest stable series about to be released.
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).
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.
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 four each include coprs mentioned earlier in the table as a runtime dependency. Users of the ‘stable-rc’ copr thus will receive packages from the ‘stable’ or ‘fedora’ coprs when the latter contain kernels which package managers like DNF will considers newer. 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; users of the 'mainline' repo will also receive daily snapshots from 'mainline-wo-mergew' repo once the merge window ended. 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 release uses by default, as doing so could lead to problems. Rawhide for example regularly uses the 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.

How to install a kernel from the vanilla repositories

First enable the kernel vanilla copr you want 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 kernel-devel

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 kernels in copr 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 retrieve newly released kernels from Fedora again.

How to remove the kernel vanilla repositories and uninstall 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 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 Desktops

Important note: the following instructions only work as intended for the @kernel-vanilla coprs 'fedora' and 'next', as those are the only ones that are stand alone. The instructions most of the time will do the right thing on 'mainline-wo-mergew' copr as well; but with the @kernel-vanilla coprs 'stable', 'stable-rc', and 'mainline' they will often install an obsolete kernel and remain on it. That's because the latest versions suitable for users of those coprs in about 50 to 80 percent of the time is distributed through a higher level copr the repo files for those coprs enable as coprdep. The note under the table above explains this scheme in more detail. This approach works well with DNF, but to our knowledge is unsupported by 'rpm-ostree overlay', as it ignores the coprdep repos.

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 coprs are normal

Please be aware that at least one and up to three out of the six kernel vanilla coprs will always look empty or outdated when you check copr’s web interface or look 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. See the note under above table for a more detailed explanation.

Linux kernel versions currently offered

A repostatus file shows what the repositories currently provide. Alternatively, execute the following script to query the latest packages locally:

dists=(38 39 40 rawhide)
dnf clean all > /dev/null
for repo in 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/"
	for distro in ${dists[*]} ; do
  	  queryresult="$(eval dnf repoquery ${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
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 build using a RPM spec file that is nearly identical to the one used to build Fedora’s kernel. Note though that none of the maintainers of the 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.