grub2-install on UEFI make the machine unbootable

General support questions
Post Reply
Plamen
Posts: 1
Joined: 2014/12/05 16:58:21

grub2-install on UEFI make the machine unbootable

Post by Plamen » 2014/12/05 17:20:43

Hello

I have CentOS 7 x64 installed in a VMware virtual machine with UEFI firmware. When I try to reinstall GRUB (I need to have that automated) using grub2-install, the result is an unbootable machine that gets to grub prompt. It looks as it can't find grub.cfg though it is there.
What I do is issue grub2-install both w/o arguments and in the form

Code: Select all

grub2-install --target=x86_64-efi --bootloader-id=centos --efi-directory=/boot/efi --recheck --verbose /dev/sda
and some combinations of the arguments. I believe all of them are optional but checked anyway.
I've also noticed that /boot/efi/EFI/centos contains shim.efi and grubx64.efi, the first being the default boot option before reinstall, the second - after that.
I have tried booting from the old shim.efi from UEFI menu but the result is still the same (though it hasn't been recreated by grub2-install).
Am I missing something?

Thanks

aks
Posts: 3008
Joined: 2014/09/20 11:22:14

Re: grub2-install on UEFI make the machine unbootable

Post by aks » 2014/12/08 17:03:11

How about:
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
?

Post Reply

Return to “CentOS 7 - General Support”