Ask Your Question

Fedora 29 keep specific kernel

asked 2019-04-27 10:24:39 -0500

I need to keep a specific version of a kernel (e.g. 5.0.7-200.fc29.x86_64) due to compatibility issues with latest ones.

A search returned How to tell yum to keep an old kernel when updating the kernel? but that no longer seems to work ( sudo: yumdb: command not found)

I also see I can keep n number of past kernels installonly_limit=5 but only 3 kernels being saved but what I would like to do is ensure that I can always revert to this working kernel even if 10 new kernels are released.

How can I tell dnf to save, and ideally keep listed in boot menu, my working kernel?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2019-04-27 22:48:27 -0500

Benjamin Doron gravatar image

I assume that your issue is module loading with kernel lockdown enabled (via secure boot or kernel command line, it makes no difference).

This issue is being tracked in red hat Bugzilla IDs 1696671 and 1701096 (5.0.8 fixed the first issue, exposing the second). You can read up on these bugs if you'd like, but they should be fixed in 5.0.10 which was just released by upstream. In a week, maybe 2, that kernel version should arrive in stable.

Of course, knowing how to keep a particular version of a package installed is useful too.

edit flag offensive delete link more

answered 2019-04-27 13:21:27 -0500

villykruse gravatar image

Edit /etc/dnf/dnf.conf and add an an entry for excludepkgs:

From man dnf.conf


          Exclude packages of this repository, specified by a name or a glob and separated by a comma, from all opera‐
          tions.  Can be disabled using --disableexcludes command line switch.

installonly_limit= also works.

If this works for PackageKit or Gnome Software I can't tell. Lately PackageKit and dnf is now sharing a lot of code since Fedora 29.

edit flag offensive delete link more


Thank you - I upped the installonly_limit and based on your keywords, was able to find this relevant post which I hadn't seen before how to block kernel updates or install lts kernel version)

Ideally, I'd like to be able to keep updating the kernel and just save the one known good kernel, in case the issue is resolved in the future which was one reason the "yumdb set installonly keep kernel-5.0.7-200.fc29.x86_64" was explicitly appealing, but I think this is a good start.

grepirnw gravatar imagegrepirnw ( 2019-04-27 15:00:56 -0500 )edit

Question Tools

1 follower


Asked: 2019-04-27 10:24:39 -0500

Seen: 3,716 times

Last updated: Apr 27 '19