TL;DR: In a Windows 10 / Ubuntu UEFI dual-boot scenario, booting Windows 10 from Grub causes Windows Boot Manager to overwrite / remove Grub. How can I stop this from happening?
My PC has been happily UEFI single-booting Ubuntu 18.04 for a long time. I recently decided to install Windows 10 and dual boot them. I've done this plenty of times in the old BIOS/MBR days so didn't anticipate major problems.
My installation process was:
- Install Windows 10. As expected, this overwrote Grub with the Windows Boot Manager.
- Use a live-usb and Boot-Repair to reinstall Grub.
- Boot to my existing Ubuntu 18.04 installation and run
update-grubwhich automagically picked-up the new Windows install.
- Use Grub to boot Windows 10
Here's where things went wrong. After spending some time in Windows I needed to boot back to Ubuntu. I restarted the machine and, to my surprise, found that it booted straight back into Windows 10 with no sign of Grub anywhere.
I restored Grub as before but found that booting into Windows caused Grub to "disappear" every time.
- HP Z420: latest BIOS
- Boot Settings:
- UEFI boot mode enabled
- Legacy boot mode disabled
- Secureboot disabled
- Fastboot enabled
- Single SSD (
sda) with GPT Table
sda1: EFI System Partition
sda2: Ubuntu 18.04 (mounts
sda3: Windows 10
Things I've Tried
- A lot of the answers which pop-up around this seem to suggest Legacy/MBR dual-booting. I'd like to avoid the hassle and potential data loss of switching GPT to a DOS partition table and also ... it's 2020 it feels like this shouldn't be a problem!
- I tried deactivating and lowering the priority of Windows Boot Manager using
efibootmgras suggested here and here but Windows Boot Manager just re-enables itself when I boot Windows!
I would very much appreciate any assistance. I feel like this shouldn't be hard!