this post was submitted on 29 May 2024
5 points (100.0% liked)

Fedora Linux

1769 readers
23 users here now

All about Fedora Linux

founded 5 years ago
MODERATORS
 

I installed a GRUB theme and changed some options in the config but now I need to run update-grub (alias for grub2-mkconfig -o /etc/grub2-efi.cfg) after every kernel update or else that new kernel version won't boot. Does anybody know a fix for this?

you are viewing a single comment's thread
view the rest of the comments
[–] Fisch@discuss.tchncs.de 1 points 5 months ago (1 children)

I only installed the theme (I think by using grub customizer) and then I changed some options in /etc/default/grub to e.g. show a submenu for the kernel versions instead of having them all in one list. I don't know what BLS is but I have the option GRUB_ENABLE_BLSCFG set to false, if I remember correctly, I set that to false because the theme wouldn't show up otherwise or something. But from your comment, it sounds like BLS has something to do with dynamically loading kernel entries, so maybe setting that to false is the source of my issue.

[–] jrgd@lemm.ee 2 points 5 months ago* (last edited 5 months ago) (1 children)

Based on how the script /usr/lib/kernel/install.d/99-grub-mkconfig.install (a script that runs on kernel installations) behaves, unless you are running in Xen Hypervisor or are on an architecture that doesn't support it, Fedora by default expects to have GRUB_ENABLE_BLSCFG set to true. This script is provided by the package grub2-common, so it's unlikely it can be removed without removing the GRUB bootloader's management system entirely.

More than likely, most customizations will work just fine with GRUB_ENABLE_BLSCFG set to true as long as you properly run grub-mkconfig (or just update-grub) after you make those changes so that they get applied to the bootloader portion of GRUB itself.

If for some reason you do absolutely need to disable BLS in order to get the customization you want, the proper way to enforce grub-mkconfig on new kernels would be to write a script in the /usr/lib/kernel/install.d/ directory titled like 98-grub-manual-mkconfig.install that would forcibly run the proper mkconfig command after kernel installation and initramfs generation.

[–] Fisch@discuss.tchncs.de 1 points 5 months ago

I just tested it, enabling GRUB_ENABLE_BLSCFG fixed the issue. Unfortunately, submenus don't work with it enabled. That was probably why I disabled it. Thanks for your help.