Grub 2 install error: grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist.

Dont know if you solved your problem, thus this is 1y ago.

I ran into a same situation recently in Ubuntu 18.04, that chroot to another directory and run grub-install:

$ chroot /media/cdrom0 grub-install

Throws error:

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

Finally solved this error by installing grub-pc:

$ sudo apt-get install grub-pc

After this, items under /usr/lib/grub changed from:

grub-mkconfig_lib  x86_64-efi  x86_64-efi_signed

To:

grub-mkconfig_lib  i386-pc  x86_64-efi

install grub-pc-bin

grub-pcappears to be a meta package which will remove(!) grub-efi-amd64, which I guess would brick the pc, maybe not right away.

installing apt install grub-pc-bin added the necessary decencies for me to install pc bootloaders from an efi system.