I know this is a pretty common problem, but I've tried a bunch of common answers (enumerated below) to no avail.
Basic setup: I'm setting up a Fedora 31 / Ubuntu 18.04 dual-boot, each with a separate encrypted / and non-encrypted /boot partition, and a single /boot/efi partition for a total of 5. Installed Fedora first, then Ubuntu. All went smoothly, and I can boot into either from the efi boot menu. I'd like to lock the efi boot order and make the startup choice in grub though, and the current Ubuntu grub options missed Fedora. So I booted into Fedora and tried
grub2-install /dev/sda to reset the MBR to Fedora's grub configuration and add Ubuntu. Instead I got the oh-too-common
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
- I've tried expanding the command to
grub2-install --target=x86_64-efi --efi-directory=/boot/efi --bootfloader-id=grub2with no change.
- I also tried
dnf reinstall grub2-efi shim grub2-tools
- And installing
Despite all this all I can find in my
/usr/lib/grub directory is
i386-pc but no
x86_64-efi. I'm a little out of my depth with this bootmgr stuff (my experience extends as far as hammering these problems until they work every time I have a new install).
Does anyone have a guess at what the problem is or another place to search for answers?