I would like to know how dnf treats the default Index when I do the following changes. Will the older default kernel still be available after an update or do I have two newer kernels?
I do use installonly_limit=2 in my /etc/dnf/dnf.conf.
Before I test it on my selves I try to find out if somebody already made experience with it.
grubby
List all installed kernels
To get the index number of all the installed kernels:
Yes, I just ask because of hardware where is not recognized with the 6.0.x series of kernels yet by default. Or where have to be installed additional drivers not ready yet.
p.s.
The example above is with the same kernel series.
I’m asking between 6.0.x and 5.19.x drivers to be sure of it.
I had that problem in the past. I think I was using dnf versionlock to hold it in place.
Eventually I just decided it was easier to install the LTS kernel and not have to worry about it. If the main kernel stopped working for me, I just switched to LTS until it was fixed.
Dnf will not remove the currently running kernel.
When you have the installonly_limit=2 option set that means a kernel upgrade will result in having only the currently booted kernel and the newly installed one remaining after the upgrade.
For example, if you are booted to the 5.19.16 kernel and you also have the 6.0.5 kernel installed, but a kernel upgrade installs the 6.0.6 kernel, the end result is you will now have the 5.19.6 kernel and the 6.0.6 kernels as the only 2 kernels installed.
Dnf does not remove the booted kernel no matter how far back it is in the install sequence. It instead keeps the currently booted kernel and the newest one being installed, but removes those older than the newest except the one booted to meet the installonly_limit value. It keeps the booted kernel and enough of the newest to meet that limit.
This is the reason that the default setting is installonly-limit=3 and that the settings are that the newest kernel is the default kernel for booting. It ensures you have 2 older ‘tested and functional’ kernels installed in case something prevents the newest kernel from booting, but does not retain an extremely old kernel.
For most systems that 3rd kernel is insignificant in space occupied on the storage. Since most kernels use about the same amount of space, once the system has been updated and has the three kernels saved then newer updates do not use additional space for kernel storage.
On my system I have a 350 MB /boot partition and only 200 MB of that is in use with the 3 kernels stored.
Just wanted to give a feedback on the fact, that I do use installonly-limit=2 it refers to each main kernel. So since I installed LTS Kernel I can select in two versions each and a rescue image: