[CentOS] Prevent a particular kernel from being deleted

Sat Jun 5 04:31:29 UTC 2021
Frank Cox <theatre at sasktel.net>

Somewhat related to my inquiry earlier today about the disappearing sound card, I just got to wondering if there's a way to "pin" the kernel that works with the soundcard such that it won't be deleted with future updates until and unless there's a future kernel released that solves the sound card issue.

"dnf versionlock" appears to almost do what I want, but it just locks a package to a particular version and doesn't allow it to be upgraded past that.

I'd like to be able to install updated kernels as they are released, but somehow tell dnf to never delete kernel version 4.18.0-240.22.1.el8_3.x86_64.  In the normal course of events that kernel would be deleted after a certain number of kernels are installed afterward (as specified by the installonly_limit number in /etc/dnf/dnf.conf.

So is there a way to tell dnf to update kernels in the usual manner but always keep a certain installed version until otherwise instructed?

MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com