2023-08-12 12:15:10 +00:00
|
|
|
= Installing Kernel from Koji
|
|
|
|
JetStream
|
|
|
|
:revnumber: F36
|
|
|
|
:revdate: 2022-01-08
|
|
|
|
:category: Kernel
|
2023-08-24 16:16:15 +00:00
|
|
|
:tags: How-to, Installing, Kernel, Koji
|
|
|
|
:page-aliases: kernel/installing-koji-kernel.adoc
|
2021-10-10 23:36:33 +00:00
|
|
|
|
2023-08-12 12:15:10 +00:00
|
|
|
[abstract]
|
|
|
|
A quick guide on installing a kernel from the Koji repository.
|
2021-10-10 23:36:33 +00:00
|
|
|
|
2022-01-08 03:49:47 +00:00
|
|
|
Koji is the build system Fedora developers use to build software for inclusion into Fedora.
|
|
|
|
If there is a need to install a kernel that is not currently available in the Fedora repositories,
|
|
|
|
these can be obtained from the Koji repository.
|
2021-10-10 23:36:33 +00:00
|
|
|
|
2022-01-08 03:49:47 +00:00
|
|
|
== Check Koji (Fedora build system) for archived builds
|
2021-10-10 23:36:33 +00:00
|
|
|
|
2022-01-08 03:49:47 +00:00
|
|
|
Check the https://koji.fedoraproject.org/koji/search?match=glob&type=build&terms=kernel-*[Koji] archive for the historical builds.
|
|
|
|
It is possible to use different searches or expressions to help narrow down on a specific kernel build.
|
|
|
|
Once the specific kernel has been identified, there are several ways to download and install it.
|
|
|
|
|
|
|
|
== Download using the browser and install
|
|
|
|
|
|
|
|
One way is to download the identified packages using the browser and installing them.
|
|
|
|
|
|
|
|
Download the following package rpms for a specific kernel version into a directory
|
|
|
|
(best to create a new directory and just have the downloaded rpms in it.:
|
|
|
|
|
|
|
|
----
|
|
|
|
kernel-<version>.<release>.<arch>.rpm
|
|
|
|
kernel-core-<version>.<release>.<arch>.rpm
|
|
|
|
kernel-modules-<version>.<release>.<arch>.rpm
|
|
|
|
----
|
|
|
|
|
|
|
|
then, open a command prompt and change to this directory.
|
|
|
|
Execute the command to install the kernel:
|
|
|
|
|
|
|
|
----
|
|
|
|
sudo dnf install *
|
|
|
|
----
|
|
|
|
|
|
|
|
== Download and install a kernel using the koji client
|
|
|
|
|
|
|
|
=== Install the koji client
|
|
|
|
|
|
|
|
The koji client makes the process of installing a specific kernel much easier from the command line.
|
|
|
|
Use this command to install the client:
|
2021-10-10 23:36:33 +00:00
|
|
|
|
|
|
|
$ sudo dnf install koji
|
|
|
|
|
2022-01-08 03:49:47 +00:00
|
|
|
=== Download and install the kernel
|
2021-10-10 23:36:33 +00:00
|
|
|
|
2022-01-08 03:49:47 +00:00
|
|
|
Below is a one-line command that creates a new unique temporary directory,
|
|
|
|
downloads kernel RPMs to it and installs them.
|
|
|
|
This assumes we are working with the `x86_64` architecture.
|
2021-10-10 23:36:33 +00:00
|
|
|
|
|
|
|
cd $(mktemp -d) \
|
|
|
|
&& koji download-build --arch=x86_64 --arch=noarch kernel-n.nn.nn-nnn.fcnn \
|
2024-03-18 13:49:11 +00:00
|
|
|
&& rm *debug*.rpm *uki*.rpm \
|
2024-06-15 17:17:40 +00:00
|
|
|
&& sudo dnf install *
|
2021-10-10 23:36:33 +00:00
|
|
|
|
|
|
|
This eliminates the need to clean up after installation and the risk of installing unwanted rpms accidentally.
|
|
|
|
|
2022-01-08 03:49:47 +00:00
|
|
|
The following part of the above command downloads the kernel
|
|
|
|
and its dependencies for the given architecture and kernel version.
|
2021-10-10 23:36:33 +00:00
|
|
|
|
2022-01-08 03:49:47 +00:00
|
|
|
koji download-build --arch=[arch] kernel-<version>.<release>
|
2021-10-10 23:36:33 +00:00
|
|
|
|
|
|
|
where [arch] indicates the architecture i.e. `x86_64`
|
|
|
|
|
|
|
|
== Additional Steps:
|
|
|
|
|
|
|
|
The following additional steps are often useful:
|
|
|
|
|
|
|
|
* Set the default boot option - so this boots automatically subsequently
|
|
|
|
|
|
|
|
See xref:kernel/booting.adoc[quick-doc on setting a specific kernel to boot by default]
|
|
|
|
|
|
|
|
* Add a versionlock to ensure this version is not deleted when kernel updates are installed
|
|
|
|
|
|
|
|
See xref:dnf.adoc#sect-using-dnf-plugin[quick-doc on using the dnf versionlock plugin]
|
|
|
|
|
|
|
|
[[sect-references]]
|
|
|
|
== References
|
|
|
|
|
|
|
|
. https://fedoramagazine.org/install-kernel-koji/#comment-472889[Fedora Magazine article: How to install a kernel from koji]
|
|
|
|
|