2

I have a dual-boot system with Trisquel GNU/Linux and Windows 8.1, using the GRUB bootloader. However, I am having a problem where, every time I boot into Windows, it seems to be overwriting GRUB, so that on subsequent boots, it boots straight into Windows. I know how to boot into a live USB and re-install GRUB, but it is becoming a real pain to have to do it every time I boot into Windows. I need a longer-term solution to prevent Windows from overwriting my bootloader.

I am aware of this existing question at Unix & Linux SE:

https://unix.stackexchange.com/questions/68581/how-can-i-prevent-windows-from-overwriting-grub-when-using-a-dual-boot-machine

However, the answers there have not helped me (and may be out of date). I have disabled Windows automatic updates and I have verified that no Windows update has been performed since last year. (I posted a follow-up on U&L SE and they recommended I try here instead).

So, does anyone know how I can absolutely prevent Windows from ever overwriting my bootloader, without my permission?

Please note that I am not looking for advice on how to re-install GRUB. I know how to do that and have done it countless times. I need a more sustainable solution to prevent Windows from screwing with my boot sector in the first place.

Time4Tea
  • 379
  • 4
  • 17
  • UEFI or Legacy? –  Feb 27 '18 at 01:19
  • @MichaelBay UEFI. I have legacy boot disabled in the BIOS. – Time4Tea Feb 27 '18 at 04:10
  • If so neither Windows is overwriting Grub nor it needs to be reinstalled. There are two reason for your reported issue: 1. Windows somehow is putting itself as first boot priority (happens in some cases with feature updates) which is rare (never happened to me) or 2. You have a "broken UEFI" that violates UEFI standards and tends to boot Windows only. –  Feb 27 '18 at 04:20
  • Although there's really no solution for #2 except an update from the manufacturer, for #1 it's simply a matter of opening UEFI settings and select Grub (Trisquel in this case) again as the first boot priority. Then boot Trisquel and update Grub: `sudo update-grub` (probably, I don't know Trisquel, the command is for any Debian or derivative). –  Feb 27 '18 at 04:24
  • PS - The linked guide obviously isn't applicable for your case. It's for legacy (BIOS) install and MBR only! –  Feb 27 '18 at 04:25
  • @MichaelBay I doubt that #2 is the case, as the GRUB menu appears after I re-install it, but vanishes after the first time I boot into Windows. So, something is definitely changing after I boot into Windows. For #1, you mean the boot priority within GRUB? I don't quite follow. Which UEFI settings are you referring to? – Time4Tea Feb 27 '18 at 04:29
  • Do you mean the firmware settings? In there, I only see options for selecting the boot device priority, not choosing the bootloader. – Time4Tea Feb 27 '18 at 04:31
  • If you're using UEFI (you should, of course) you better *know* UEFI and it boots, quite different from the old BIOS/MBR. In UEFI all bootloaders coexist in the ESP (EFI System Partition) and any installed OS can be booted independently. Your last comments tells me you know nothing of this and you don't know where to find the settings. I can't help you that, it varies a lot depending on the manufacturer and UEFI implementation. –  Feb 27 '18 at 04:34
  • @MichaelBay ok, I'll investigate to see if I can figure out how to access those UEFI settings on my mainboard. Somehow then, Windows must be changing those settings when I boot it. – Time4Tea Feb 27 '18 at 11:53

1 Answers1

3

Following the advice of MichaelBay in the comments, I believe I have figured out what the problem was. It seems that on booting, Windows was changing the UEFI boot settings to set the Windows Boot Manager to be the default bootloader. I have to admit that I was somewhat ignorant of how UEFI booting works, but I found this page to be very helpful:

https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/

The issue was essentially the same as this question:

Windows 8 changes boot order

My machine is a Dell Inspiron 660 desktop and it seems that, unfortunately, the UEFI firmware UI for it is basically garbage. However, I was able to use the following commands at the Windows command prompt to change the bootloader back to GRUB:

bcdedit /set {bootmgr} path \EFI\trisquel\grubx64.efi
bcdedit /set {bootmgr} description GRUB

Since I did this, Windows no longer seems to be trying to change the settings and GRUB is loading up every time. Problem solved!

Time4Tea
  • 379
  • 4
  • 17