
On Mon, 8 Feb 2021 at 16:01, D. Hugh Redelmeier via talk <talk@gtalug.org> wrote:
Anything that can get more complicated will get more complicated. Boot loaders seem to be an example.
It used to be straightforward to read /boot/efi/EFI/fedora/grub.cfg. Now, building the list of kernels for the menu is farmed out to blscfg (a grub module).
I needed to have a Fedora box default to booting a kernel that isn't the latest (because the latest cannot bring up the display on my computer).
1. I needed to make updates not delete the working kernel. Normally updates keep only the last three kernels. As of today, two are duds. Fix: change /etc/dnf/dnf.conf's installonly_limit from 3 to 0
2. Find the list of kernels known to grub: sudo ls /boot/loader/entries/*.conf
3. set the default to one of those. Use the filename, without the directory and without the .conf sudo grub2-set-default 2733f1c892a5422c98bdb188c4f62737-5.10.9-201.fc33.x86_64
I don't know how long this sticks.
A couple comments: - I think raw GRUB still works from a single .conf file that can be edited by hand. The problem you're seeing is that most distros have built out a complex system to construct and replace that .conf file whenever a new kernel arrives. The assumption is of course that mere mortals shouldn't be touching that config. I learned a lot about GRUB2 configuration at one time, but I don't mess with Fedora's GRUB config system. - Nicholas mentioned the in-place replacement of kernels: I think(?) I've seen that behaviour on Debian with same-version kernels with security updates, but I don't think I've ever seen it for any reason on Fedora. - if you have a separate /boot/ partition (very likely these days) and you're never deleting kernels, you stand a good chance of over-filling that partition and getting into trouble, particularly on Fedora which likes to push a new kernel every couple weeks. You'll want to keep an eye on the space remaining in /boot/ and delete some of the newer kernels you don't need by hand. -- Giles https://www.gilesorr.com/ gilesorr@gmail.com