Would someone like to convert the "how to install a kernel from Koji" Fedora magazine post to a quick-doc?

See: Downgrading to a previous kernel version - #2 by sampsonf

There’s a magazine post on installing a kernel from Koji:

I think this would make a great quick-doc. Would someone like to take this on? We’ll be happy to help you learn the necessary skills. It’s a great way to contribute and learn lots at the same time.

https://docs.fedoraproject.org/en-US/quick-docs/contribute-to-quick-docs/

4 Likes

@JetStream has kindly agreed to take this on :clap:

3 Likes

thx @JetStream !!

2 Likes

So, I looked at the comment from @pfrields in conjunction with the original Fedora Magazine article and followed the steps.

I have documented it for now in my original post as an update. Have a look, please.

To me it looks like enhancing the original Fedora Magazine post to include the additional steps. What do you guys think?

1 Like

Looks very good.

The thing with the magazine is that posts cannot be updated later. They’re published and represent information at that point in time. They’re more for outreach/marketing—not so much for actual technical documentation.

I think an article on “Installing kernel from Koji” would fit really well here:

https://docs.fedoraproject.org/en-US/quick-docs/kernel/overview/

The version lock bit is already documented here, so you can just link to this section:

https://docs.fedoraproject.org/en-US/quick-docs/dnf/#_using_the_dnf_versionlock_plugin

I don’t think there’s a quick-doc on changing the default boot option, so that could probably be added as a new short quick-doc too.

This is a lot to type, even usingtab to auto-complete.

sudo dnf update ./kernel* 

should suffice.
You can also remove the downloaded packages (likely >200 MB) after installation again.

2 Likes

Is there a command to find out the exact version of 5.12.latest kernel?

Personally, I like more, less typing:
grubby --info=ALL
grubby --set-default-index=

The website kernel | Package Info | koji has the kernels that have been released for fedora. Check there.

How to use the search function at that page?

I tried to use “kernel-5.12” in the search field, and got nothing returned.

I just manually parse it and pick out what I want. The search did not work for me either.

1 Like

Did you change the search type to “Build” and then try “kernel-5.12*”. That should list them all:

https://koji.fedoraproject.org/koji/search?match=glob&type=build&terms=kernel-5.12*

The default search type is “package”, so it won’t match “kernel-5.12” since that isn’t a package name.

1 Like

Thank you!

Here’s my draft for submission. I have condensed it into a brief article for all to review.

@ankursinha FYI. Looking forward to guidance on the next steps on getting this into the quick-doc

[draft] quick-doc 1 - installing kernels from Koji

Koji is the build system Fedora developers use to build software for inclusion into Fedora. If there is a need to install a kernel different from the one that gets installed by default, these can be obtained from Koji.

The koji package makes this process much easier.

  • Install the koji package
$ sudo dnf install koji
  • Download and install the kernel

Below is a one-liner that creates a new unique temporary directory, downloads RPMs to it and installs them. This assumes we are working with the x86_64 architecture.

cd $(mktemp -d) && koji download-build --arch=x86_64 --arch=noarch kernel-5.12.18-200.fc33 && sudo dnf install *

This eliminates the need to clean up after installation and the risk of installing unwanted rpms accidentally.

[ credits to @augenauf ]

The following part of the above command downloads the kernel and its dependencies for the given architecture and kernel version.

koji download-build --arch=[arch] kernel-n.nn.nn-nnn.fcnn

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 quick-doc ( link to new quick-doc - draft 2 below )

  • Add a versionlock to ensure this version is not deleted when kernel updates are installed

See quick-doc (Using the dnf versionlock plugin - Using the DNF software package manager :: Fedora Docs )

References

1 Like

[Draft] quick-doc 2 - setting an installed kernel to boot by default

To set a specific installed kernel to boot by default, use the following command:

sudo grubby --set-default /boot/vmlinuz-n.nn.nn-nnn.fcnn.x86_64

References:

1 Like

Thanks, that looks great.

Quick-docs follow the standard “pull request” model. Would you be familiar with that, otherwise I can give detailed instructions on how to go about it.

Here are the links in the meantime:

I am going through the above docs … need to work through the steps on raising a “pull request” … bear with me please while I work through it.

1 Like

No worries, please take your time, and if you have any queries at all, please post here and we’ll be happy to help.