PDA

View Full Version : grub2-install: command not found similar command is 'grub2-install'



RichG
31st August 2017, 09:49 AM
While trying to fix an over written grub2 boot by chrooting into the Fedora 26 partition I get:

> bash: grub2-install: command not found
> Similar command is 'grub2-install'

Re-installing grub2 through dnf doesn't help.

Any pointers to get this fixed?

And why the highly bizarre message?

RichG
31st August 2017, 10:17 AM
I should add that this is an MBR installation not EFI and I'm trying to re-install grub to the fedora partition, not the MBR.

glennzo
31st August 2017, 10:54 AM
Just a guess... Maybe you need the absolute path? Something like /usr/sbin/grub2-install ???

RichG
31st August 2017, 12:07 PM
Just a guess... Maybe you need the absolute path? Something like /usr/sbin/grub2-install ???

Brilliant guess. Thanks you very much. Should have thought of that myself!

Had to do the same with grub2-mkconfig command too. Seems the /usr/sbin/ path was not being picked up in chroot, although /usr/bin/ was. A little odd, but all fixed now.

Cheers.