GRUB2 – GRUB2 Missing After Booting Windows 10

grub2linux-mintuefiwindows

I installed Windows 7 on an SSD and upgraded it to Windows 10. Then I installed Linux mint 17.2 Cinnamon and had the following partitions:

The boot menu was showing Linux Mint and Windows 10 and I thought everything was fine. UEFI boot configuration showed "ubuntu". However after booting Windows and then rebooting, grub was gone, and in boot configuration there was only "Windows Boot Manager" available.
When I repaired grub2 with grub-install and grub-update I was able boot Linux Mint again, but only as long as I don't boot into Windows 10, which seems to wipe out grub like this every time.

Secureboot and Fastboot are disabled.

/boot/efi contains folders Boot, Microsoft and ubuntu.

Did I do something wrong? How can I get grub2 working permanently?

Best Answer

I found the problem. Looking at the NVRAM with sudo efibootmgr I noticed that the Windows boot loader somehow seems to have the urge to be the first entry in the boot order. When I changed it to grub2 being first, windows overwrites entry 0000 and changes the boot order, even if grub2 was 0000 before, therefore overwriting it.

The solution was setting the Windows boot manager entry inactive but leave it in first position of the boot order:

sudo efibootmgr --bootnum 0000 --inactive sudo efibootmgr --bootorder 0000,0002,000C,000D

(with 0002 being grub2)

Related Question