Running grub2-install after Fedora version upgrade

Once upon a time, it was advised:

“Systems with the BIOS firmware have the GRUB RPM packages updated. However, the installed or embedded bootloader is never updated automatically. It is a good idea to update it between Fedora release versions.”

In the olden days, this command used to output:

Installing for i386-pc platform.
Installation finished. No error reported.

I have a UEFI BIOS and Fedora 41, and the command “grub2-install /dev/sda” can’t find the file it needs anyway:

grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn’t exist. Please specify --target or --directory.

I have a feeling a manual grub2-install run is either no longer recommended or that current grub2 updates take care of keeping the boot block (or whetever it’s called) up to date.

Is this the case?

That is not just a feeling. It is documented that you do not run grub2-install when booted in UEFI mode. Instead the grub2 components are loaded directly into /boot/efi when installing the various grub2 packages.

You can run grub2-mkconfig -o /boot/grub2/grub.cfg to update the grub.cfg file.

1 Like

See the difference between UEFI and BIOS systems at step 11: