From Fedora Project Wiki

Revision as of 07:17, 15 January 2023 by Thl (talk | contribs)

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.

How to install a Linux vanilla kernel from these repos

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 thl/kernel-vanilla-mainline
sudo dnf update ‘kernel*’

In case you want that vanilla kernel just for a quick test, run sudo dnf copr remove thl/kernel-vanilla-mainline right afterwards to remove the repository again. Later when you 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.

What kernels do the various repositories offer

repository description target users example version sequence
mainline mainline kernels, either built from a proper release, a pre-release (aka "rc kernel"), or a git snapshot anyone who want to run a kernel built from the the latest Linux codebase …, 6.1-rc8-202212111, 6.1, 6.2-rc0-202212113, 6.2-rc0-202212114, 6.2-rc0-202212115, …
mainline-wo-mergew identical to the ‘mainline’ repositories, but steers clear of git snapshots during merge windows 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.1-rc8-202212111, 6.1, 6.1.1-rc1, 6.1.1, 6.2-rc1, 6.2-rc1-202212126, 6.2-rc1-202212113, …
stable-rc pre-releases of the next stable release anyone who want to help testing future Linux stable kernels …, 6.0.14, 6.0.15-rc1, 6.0.15, 6.1.1-rc1, 6.1.1, …
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 want the latest Linux stable kernel …, 6.0.14, 6.0.15, 6.1.1, 6.1.2, 6.1.3, …
fedora vanilla kernels from the stable series the latest Fedora Linux currently uses anyone who want 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, …
Note: each repository mentioned above includes all the ones mentioned below it as runtime dependency. Users of the ‘stable-rc’ repository thus will receive packages from the ‘stable’ or ‘fedora’ repositories when they ship kernel packages which rpm considers newer; this will ensure stable-rc users won’t be stuck on a kernel with known problems that were fixed between the release of the rc and the final of one version.


Be aware that these repositories intend to never provide kernels older than those used by default on the particular Fedora release, as that could lead to all sorts of issues. That aspect is extremely visible for users of Fedora rawhide, which regularly uses the latest mainline builds all the time; that’s why rawhide users that have one of these repos enabled will receive vanilla mainline builds all the time as well, even if they have the ‘stable’ or ‘mainline-wo-mergew’ repos enabled. The same can happen for Fedora releases still in development (e.g. a beta version)

What Linux kernel versions do the various branches currently contain?

Look at the file repostatus.txt or execute the following script to query the latest packages locally:

dists=(36 37 rawhide)
dnf clean all > /dev/null
for repo in fedora stable{,-rc} mainline{-wo-mergew,}; 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

Who is behind this effort?

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

Will my systems work better or run in a more secure manner with these kernels?

Most of the time there won’t be much of a difference. 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.

Some of the kernel vanilla repositories look outdated or abandoned!

Yes, the repositories will look outdated or abandoned when you check for recent builds in copr or look straight at the repositories. But be ensured, that’s not the case. This is because the most recent build for a particular repository might be found in one of the other kernel vanilla repositories the particular copr repo includes as a runtime dependency.

For example, the most recent ‘mainline’ build for rawhide won’t lie in the ‘mainline’ repository and instead can be found in the ‘fedora’ repository. See the footnote in above table for details. Don’t let that bother you, your package manager will handle this automatically.

What is the goal of these repositories? Are these kernels as good as those Fedora provides?

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