From Fedora Project Wiki

No edit summary
(43 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Package repository with Linux vanilla kernels for Fedora =  
= Linux kernel vanilla repositories for Fedora Linux =


This page contains information about a [http://repos.fedorapeople.org/repos/thl/ set of repositories] which contain RPM packages with Linux vanilla kernels built for Fedora. 'Vanilla' in this scope means 'unmodified'. In other words: the sources used to compile those kernels come straight from kernel.org and do not contain any of the enhancements which the official Fedora kernels contain.
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.


= How to use these repos =
{{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.}}


== How to use, the quick (aka TLDR) version ==
== Linux kernels series offered in the repositories ==
 
Download the definitions for the Kernel vanilla repositories:
<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 get the latest development kernel:
<pre>
sudo dnf --enablerepo=kernel-vanilla-mainline update
</pre>
 
You don't want to run a development kernel and want the latest stable kernel instead? Then run this:
<pre>
sudo dnf --enablerepo=kernel-vanilla-stable update
</pre>
 
Reboot. That's it – at least most of the time, as sometimes it's not that easy:
 
* Is UEFI Secure Boot active on your system (<code>mokutil --sb-state</code> will tell you)? Then you have to disable it in your BIOS Setup or via <code>mokutil --disable-validation</code> to run kernels from these repos, as they are not signed with a key that a default Secure Boot setup considers trusted.
 
* Nothing gets installed by the "dnf update"-command? Then the version of the latest kernel package installed on your machine is higher than the version of the latest kernel packagers offered in the chosen kernel-vanilla repository.
 
* The newly installed kernel will normally get started by default. If that's not the case there is something fishy in your boot configuration. For example, if you start Fedora using a boot manger from a different distribution you'll have to boot into that one and update its boot loader configuration to pick up the newly installed kernel (this problem is not specific to the packages from this repo); in Ubuntu you do that by running <code>update-grub</code>.
 
Optionally run
<pre>
sudo dnf config-manager --set-enabled kernel-vanilla-mainline
</pre>
 
or
 
<pre>
sudo dnf config-manager --set-enabled kernel-vanilla-stable
</pre>
 
if you want to enable one of those repositories permanently – which is something you normally want, to make sure you get fixes for security problems that got fixed by the kernel developers.
 
Note: The above mentioned repositories are the two main ones. There are three more for special use cases. For details see below.
 
== How to use, the verbose version ==
 
=== Configure the repositories ===
 
First download the repository definitions for DNF:
 
<pre>
curl -s https://repos.fedorapeople.org/repos/thl/kernel-vanilla.repo | sudo tee /etc/yum.repos.d/kernel-vanilla.repo
</pre>
 
This will install a repo file with following repos:


{| class="wikitable"
{| class="wikitable"
!style="vertical-align:top;"|repository
!style="width: 17%;"|[https://copr.fedorainfracloud.org/groups/g/kernel-vanilla/coprs/ repository]
!description
!style="width: 30%;"|description
!target users
!style="width: 30%;"|target users
!example versions
!style="width: 23%;"|example version sequence
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| kernel-vanilla-mainline
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/fedora/ fedora]'''
| the latest kernels from the Linux mainline series
| vanilla kernels from the stable series the latest Fedora Linux currently uses
| those who want the latest mainline kernel
| anyone who wants to check if vanilla kernels shows the same bug or behavior as the latest Fedora kernel
| 4.4, 4.5-rc0-git1, 4.5-rc1, 4.5-rc1-git2
| …, 6.0.18, 6.0.19, 6.1.5, 6.1.6, …
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| kernel-vanilla-mainline-wo-mergew
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/stable/ stable]'''
| the latest kernels from the Linux mainline series, except during the merge window, when it might contain the latest stable kernel.
| 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
| those who want the latest mainline kernel, but want to avoid development versions from the merge window (like 4.5-rc0-git1) – that the phase in the development cycle when the bulk of changes get merged for a new kernel version
| anyone who wants the latest Linux stable kernel
| 4.4, 4.4.1, 4.5-rc1, 4.5-rc1-git2
| …, 6.0.14, 6.0.15, 6.1.1, 6.1.2, 6.1.3, …
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| kernel-vanilla-stable
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/stable-rc/ stable-rc]'''
| the latest non-development version from the mainline or stable kernel series
| pre-releases of the next stable release
| those who want the latest Linux stable kernel
| anyone who wants to help testing future Linux stable kernels
| 4.4, 4.4.1
| …, 6.0.14, 6.0.15-rc1, 6.0.15, 6.1.1-rc1, 6.1.1, …
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| kernel-vanilla-stable-rc
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/mainline-wo-mergew/ mainline-wo-mergew]'''
| the latest non-development version from the mainline or stable kernel series, but also kernels from the stable series that are about to get released
| mainline kernels, either built from a proper release or a pre-release (aka "rc kernel"); also git snapshots of mainline, except during merge windows
| those who want to help testing new stable kernels
| anyone who normally wants the latest mainline kernel, but wants to play it a bit safer by avoiding mainline during its 'merge windows'; that's the phase at the beginning of a development cycle where the bulk of changes (~85 percent) including all riskier ones are merged for the next mainline release before its first pre-release (e.g. a “-rc1") is published
| 4.4, 4.4.1, 4.4.2-rc1
| …, 6.1-rc8-20221211, 6.1, 6.1.1-rc1, 6.1.1, 6.2-rc1, 6.2-rc1-20221226, 6.2-rc1-20221227, …
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| kernel-vanilla-fedora
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/mainline/ mainline]'''
| 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 major version
| mainline kernels, either built from a proper release, a pre-release (aka "rc kernel"), or a git snapshot
| those who want to check if a vanilla kernel shows the same bug or behavior as the Fedora kernel
| anyone who wants to run a kernel built from the the latest Linux codebase
| 4.4, 4.4.1
| …, 6.1-rc8-20221211, 6.1, 6.2-rc0-20221213, 6.2-rc0-20221214, 6.2-rc0-20221215, …
|- style="vertical-align:top;"
| '''[https://copr.fedorainfracloud.org/coprs/g/kernel-vanilla/next/ next]'''
| linux-next kernels; use at your own risk!
| 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-0.0.next.20221210, 6.1-0.0.next.20221211,6.1-0.0.next.20221213, …
|- 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.
<br>
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.
|}
|}


Choose which one of those you want to use. The following examples assume you want to use the <code>
== How to install a vanilla kernel from these repositories ==
kernel-vanilla-mainline</code> repository, hence adjust the commands if you want to use a different repository.


=== Install a kernel from the repository ===
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.
 
Now enable one of the kernel vanilla repositories and update your system. The following commands for example will install the latest mainline kernel:


Run this command to install the latest mainline kernel from the kernel vanilla repos:
<pre>
<pre>
sudo dnf --enablerepo=kernel-vanilla-mainline update
sudo dnf -y copr enable @kernel-vanilla/mainline
sudo dnf upgrade 'kernel*'
</pre>
</pre>


Alternatively you can permanently enable that repository to make DNF automatically install new kernel packages when updating the system:
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.


<pre>
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:
sudo dnf config-manager --set-enabled kernel-vanilla-mainline
sudo dnf update
</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:
<pre>
<pre>
Retrieving key from https://repos.fedorapeople.org/repos/thl/RPM-GPG-KEY-knurd-kernel-vanilla
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
Importing GPG key 0xCC9DBCAB:
Userid    : "Thorsten Leemhuis (Key for signing vanilla kernel rpms) <fedora@leemhuis.info>"
Fingerprint: e5e8 d53e e5af be95 633d 690f d792 7a2f cc9d bcab
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.
== How vanilla kernels compare to Fedora’s ==
 
= Important notes =
 
Please be aware that
 
* none of the developers that maintain the Fedora kernel is involved in the maintenance of the kernel vanilla repos for Fedora
* most systems work better and run in a more secure manner with the official Fedora kernels
* if you don't know what above commands do then you likely should not use these repos or its packages
 
= More details about the kernel vanilla repos =


== What kernel versions do the repos currently contain? ==
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.


Look at [http://www.leemhuis.info/files/kernel-vanilla/repostatus.txt this file] or cut'n'paste these lines if you want to query the latest status yourself:
== It’s normal that some repositories are empty or look abandoned ==


<pre>
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).
releases="25 24 23 22"; branches="mainline mainline-wo-mergew stable-rc stable fedora"; \
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>


== Who is behind this effort?  ==
== Linux kernel versions currently offered ==


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.  
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]'''.


== How can I uninstall all kernels from the kernel vanilla repositories ==
Or execute the following script to query the latest packages locally:


Boot into a stock Fedora kernel and run
<pre>
<pre>
sudo dnf remove $(rpm -qa 'kernel*' | grep '.vanilla.knurd' )
dists=(36 37 rawhide)
dnf clean all > /dev/null
unset repostring
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/"
    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
</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? ==
These and many other questions are [[Kernel_Vanilla_Repositories-FAQ|answered in the FAQ about the kernel vanilla repositories]].
= Known issues and differences =


The following sections will list differences to Fedora's proper kernel packages that might be relevant to users. It will also list known problems specific to the packaging of the vanilla kernels.
== Developers behind the effort and point of contact  ==


== General ==
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.


* No issues known.
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? ==


* enable some of the staging drivers Fedora avoids (basically those a well known add-on repository for Fedora ships as add-on package)
These and many other questions are answered in the [[Kernel_Vanilla_Repositories-FAQ|FAQ about the Linux kernel vanilla repositories for Fedora Linux]].
* automate builds more to keep repos more up2date
* automate builds for stable-testing kernels

Revision as of 05:52, 23 March 2023

Linux kernel vanilla repositories for Fedora Linux

The 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.

Warning.png
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 this announcement. Sorry for the inconvenience.

Linux kernels series offered in the repositories

repository description target users example version sequence
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, …
stable 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 anyone who wants the latest Linux stable kernel …, 6.0.14, 6.0.15, 6.1.1, 6.1.2, 6.1.3, …
stable-rc pre-releases of the next stable release anyone who wants to help testing future Linux stable kernels …, 6.0.14, 6.0.15-rc1, 6.0.15, 6.1.1-rc1, 6.1.1, …
mainline-wo-mergew mainline kernels, either built from a proper release or a pre-release (aka "rc kernel"); also git snapshots of mainline, except during merge windows anyone who normally wants the latest mainline kernel, but wants to play it a bit safer by avoiding mainline during its 'merge windows'; that's the phase at the beginning of a development cycle where the bulk of changes (~85 percent) including all riskier ones are merged for the next mainline release before its first pre-release (e.g. a “-rc1") is published …, 6.1-rc8-20221211, 6.1, 6.1.1-rc1, 6.1.1, 6.2-rc1, 6.2-rc1-20221226, 6.2-rc1-20221227, …
mainline mainline kernels, either built from a proper release, a pre-release (aka "rc kernel"), or a git snapshot anyone who wants to run a kernel built from the the latest Linux codebase …, 6.1-rc8-20221211, 6.1, 6.2-rc0-20221213, 6.2-rc0-20221214, 6.2-rc0-20221215, …
next linux-next kernels; use at your own risk! 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-0.0.next.20221210, 6.1-0.0.next.20221211,6.1-0.0.next.20221213, …
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.


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.

How to install a vanilla kernel from these repositories

If you’re on a x86 system, first run mokutil --sb-state 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 mokutil --disable-validation; 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.

Now enable one of the kernel vanilla repositories and update your system. The following commands for example will install the latest mainline kernel:

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

In case you want that vanilla kernel just for a quick test, run sudo dnf copr remove @kernel-vanilla/mainline 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 sudo dnf remove $(rpm -qa 'kernel*' | grep '.vanilla' ) to ensure retrieving kernel updates from Fedora again.

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:

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

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.

It’s normal that some repositories are empty or look abandoned

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).

Linux kernel versions currently offered

The file www.leemhuis.info/files/kernel-vanilla/repostatus.txt shows what the repositories currently provide.

Or execute the following script to query the latest packages locally:

dists=(36 37 rawhide)
dnf clean all > /dev/null
unset repostring
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/"
    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 kernel vanilla repositories are maintained primarily by 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.

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.