[CentOS] Re-enable grub boot in UEFI (Windows took over it)

wwp

subscript at free.fr
Thu Feb 1 11:15:11 UTC 2018


Hello there,


Dell XPS-15-9560 laptop (SSD drive, UEFI, secure boot off).. Windows 10
pre-installed, CentOS7 installed in a separate partition and running
for months w/o issue. Don't know what happened but at reboot yesterday
(not even booted in Windows, just rebooted), grub has disappeared,
booted in Windows by default, which apparently has taken over the UEFI
boot.

By booting from a USB drive w/ CentOS7 LiveGnome, I could use its grub
command prompt to inspect the UEFI of the local SSD drive, see that the
centos/ sub-directory and files are still there.

/boot/efi/EFI/centos/:
BOOT.CSV
BOOTX64.CSV
fonts
grub.cfg
grub.cfg.1501243846.rpmsave
grub.cfg.1505469290.rpmsave
grubenv
grubx64.efi
mmx64.efi
shim.efi
shimx64-centos.efi
shimx64.efi

maybe /boot/efi/EFI/Boot/ contents has been altered?

/boot/efi/EFI/Boot/:
bootx64.efi
fbx64.efi

I had a backup of the full efi partition (`dd`) but it's outdated and
I feel it's a bad idea to restore the partition from it.

Still from this "external" grub prompt, I could boot into my CentOS7
using:
 configfile (hd0,gpt1)/EFI/centos/grub.cfg

At least I know how to get back to it :-).

But now, how could I give the UEFI control back to grub? Is there a
grub2 or grubby command I can run to make grub the default? I've read a
lot and still cannot figure out exactly what to do or don't dare
running commands that could make things worse.

And I have the feeling the at next Windows boot, I may need to do it
again..


Regards,

-- 
wwp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20180201/50d1275b/attachment.sig>


More information about the CentOS mailing list