package: grub2-common
severity: grave
Version: 2.02~beta2-22+deb8u1

After installing debian 8.5 jessie, I installed Windows. It removed grub from 
mbr, so booted into rescue mode using the same cd 1 image, but grub-install 
failed with this error.

grub-install: error /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please 
specify --target --directory.

Same error when manually run

# chroot /target
# grub-install /dev/sda

I can see /usr/lib/grub/x86_64-efi/modinfo.sh present instead.

When I run 

grub-install -d /usr/lib/grub/x86_64-efi /dev/sda

I get the following error

grub-install: error: cannot find EFI directory

After mounting efi partition

/dev/sda4 under /mnt and passing --efi-directory /mnt

The command succeeded and I could boot into debian after going to boot menu and 
choosing debian.

Reply via email to