grub2-install Error: modinfo.sh Missing - Common solutions attempted
Solution 1
First I ran "dnf provides" to find the right package:
dnf provides /usr/lib/grub/x86_64-efi
Then I installed the right package using its full name:
dnf install grub2-efi-x64-modules-1:2.06~rc1-2.fc33.noarch
Solution 2
I could add the missing modules by installing grub2-efi-x64-modules
package on Fedora.
In my case I had another error after that that "EFI variables were not supported on my system". I found another stackexchange post and could fix that by exiting the chroot environment and loading the efivarfs module by modprobe efivarfs
. Then I logged back in into the mounted root and mounted it via mount -t efivarfs efivarfs /sys/firmware/efi/efivars
.
Solution 3
On ubuntu (this will create efi support in /usr/lib/grub/x86_64-efi)
sudo apt install grub-efi
Solution 4
Maybe try
grub2-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=grub2
Solution 5
I solved by installing grub2-efi-modules and efibootmgr
Related videos on Youtube
fedora
Updated on September 18, 2022Comments
-
fedora over 1 year
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-commongrub2-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=grub2
with no change. - I also tried
dnf reinstall grub2-efi shim grub2-tools
- And installing
grub2-efi-modules
Despite all this all I can find in my
/usr/lib/grub
directory isarm64-efi
andi386-pc
but nox86_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?
- I've tried expanding the command to
-
Admin about 2 yearsThis works for my CentOS 8 stream
dnf provides /usr/lib/grub/i386-pc sudo dnf install grub2-pc-modules-1:2.02-99.el8.noarch