Linux then Windows install for dual-boot: Windows removing Linux from UEFI?

Hi to the community!

I’ve been happily running Linux as my main desktop for several years now, having benefited from dual-boot with Win10/Win11.

Installing various Linux distros usually went smoothly - nb: distro hopping tried and approved :slight_smile: - and I’ve settled last year (for the moment…), on the first computer, for Win11/Debian 12 dual boot, and on the second computer, Win11/RHEL-ative 10.

Everything worked fine until a Windows update broke one of the Windows, and no recovery option worked. The second Win11 also had a problem so I’ve been 100% Linux for almost a year.

As dual boot provides some benefits, I thought to give Win11 a go again, and reinstall a new Windows: I prepared a Win11 USB stick with the official ISO downloaded from the Microsoft website.

The installation went well, but in both cases, when the computer rebooted to finish the Windows install, I noticed that the GRUB menu was gone. This happened for Debian (now 13) and for RHEL-ative 10.

The BIOS/UEFI menu from the computers didn’t show the entry for the Linux distros anymore - meaning, it was removed from the firmware.

I used a Live Linux USB stick to look at things : the EFI / GRUB files were all there in the Linux FS but, with efibootmgr, it could be confirmed that the Linux EFI entry was missing from the firmware.

I then re-added the Linux entry to bring back the GRUB menu, I could then see the menu after reboot and booted again in Linux.

Except that if I chose Windows from the GRUB menu, I can boot in Windows but after restarting, the Linux entrey is gone, once again.

I repeated the test and it looks that booting Windows 11 removes now the Linux boot entry, at BIOS.UEFI firmware menu level.

Having discussed that with AI assistants, they seem to confirm this is a know behavior but it seems there is no stable solution. I also viewed the dual-boot posts on the forum but this topic is not mentioned.

Wondering if that is something the community knows of, and if there are ways to ensure stable dual-boot with Linux and Windows 11 now?

many thanks!

Alex

3 Likes

Welcome to our Linux community @Greyfox

This sounds more like a UEFI boot entry issue than GRUB itself being deleted, especially since the EFI files are still there but the firmware entry disappears.

Windows may be changing the boot order, or the firmware may be removing the Linux entry after Windows boots.

The useful check would be:

efibootmgr -v

Run it after re-adding the Linux entry, then boot Windows once, restart into Linux from a live USB if needed, and run it again. If the Linux entry is gone, then the firmware entry is actually being removed. If it is still there but lower in the order, then Windows is probably just moving itself first.

For a stable setup, rEFInd may be worth looking at because it can reduce how much you depend on the firmware boot order staying exactly as expected.

rEFInd scans the ESP at boot and finds both Linux and Windows automatically. Even if Windows clobbers the NVRAM entries, rEFInd usually survives by setting itself as the default loader.

2 Likes

I don’t have a computer with UEFI, and no experience with it.

However, if you repair the GRUB boot entry, then password protect the UEFI/BIOS settings, wouldn’t that prevent Windows from modifying the GRUB boot entries?

Also, after repairing the GRUB menu entries, have you rebooted more than once, to Linux only, to ensure that all is truly well, before trying the Win11 boot again?

From Linux, can you “cd” into the UEFI partition and set privileges to protect the directories and files? (I don’t know if that is advisable or even dangerous, but I am pretty sure you should be able to access that and potentially set those to write only.)

P.S. I just checked. Make sure the /boot and EFI partitions are ext4 and not FAT32.

The following guidance addresses that particular issue:

2 Likes

Password protection does nothing to stop Windows. It only prevents humans (who do not know the password) from getting into UEFI settings.

2 Likes

Very strange, indeed. (And welcome back.)

I have two dual-boot systems and never experienced this situation. I have had Windows alter UEFI boot order – it wants to own the system – but I’ve never had it remove other boot entries. I’ve always just fixed the boot order and it was back to booting GRUB.

Both of my systems are running Windows 11. I hardly ever use them; I keep them only for the occasional technical issue. And I keep both of them locked down with WUB.

1 Like

Many thanks for your responses, much appreciated ! :slight_smile:

@hydn : what you described as recommended steps is exactly what I did:

“Run it after re-adding the Linux entry, then boot Windows once, restart into Linux from a live USB if needed, and run it again. If the Linux entry is gone, then the firmware entry is actually being removed”

Thanks also for mentioning rEFInd : this seems to be a very interesting tool - it may be a solution, indeed, if it manages to prevent deletion of NVRAM entries - as this seems to be one of technical description of the Win11 identified behavior.

@ericmarceau : Indeed, I have rebooted more than once : when booting in Linux, everything remains as it should across reboots (GRUB menu with Linux + Windows entries). However, booting in Windows leads to deletion of the Linux boot entry in firmware, even if it is re-added with efibootmgr from a live Linux usb.

However, thanks to your comments, I could dive a bit deeper in that topic, and worked on it further with an AI assistant: we reviewed topics such as NVRAM entries, EFI fallback or potential routes for mitigation.

The conclusion appears to be that Windows 11 removes NVRAM and bypasses the fallback EFI program, which is in the present case shim (unsure if that would even bypass rEFInd though).

That behavior is also possibly linked to a BitLocker by-default set up - which wasn’t the case a bit more than a year ago - but in any case, Windows seems to be removing at low level the path to a smooth dual-boot.

As my pause in using Windows was caused by poor qualities updates that damaged Windows, I’d rather not see such issues touching or changing UEFI parameters a user should be able to manage by himself, at least in the firmware picker when booting the computer - but this doesn’t happen anymore :-/

It looks that this change may be paving the way to no-dual boot computers (if installed at the present time) but it looks that I’ll have to stop that exploration for now - a bit concerned to see my computer bricked, as the Arch Linux wiki page on UEFI mentions that possibility in case of frequent NVRAM changes, which would be the case here.

Would anyone have experienced that use case recently enough maybe?

But again, thanks very much for your messages, this helped to move forward! :wink:

3 Likes

This is exactly why I install WUB on my Windows partitions. I got tired of them mucking with my setup. I don’t use them other than for local technical issues so the risk of not receiving other updates is manageable.

4 Likes

I have not heard of that tool yet. :smiling_face_with_sunglasses: Just to be certain, this one?: WUB

Thanks!

1 Like

Yep. That’s the repository link and this one is to the webpage: WUB

2 Likes

Hi @IronRod , many thanks for your welcome and for the messages!

Well, I wish I had known WUB a bit more than a year ago, that would have been a big time saver :grin:. Btw, fantastic collection of programs, I’ll explore this, thanks very much for sharing (I have another laptop that is still 100% Windows).

On these subjects, there is a very informative article about the update issues we discussed - this is a tech blog in Dutch, and I learned lots of things about what those issues may come from.

As said, I also used dual-boot Windows and Linux for a few years, and that kind of issues never happened either. To be honest, I find it frustrating because dual-boot comes with benefits and adds some additional freedom (and a back-up option) to end users.

Anyway, I’ll try to follow that topic (and possibly whether a fresh install without BitLocker wouldn’t remove that behavior).

Many thanks again, cheers!

3 Likes

I am just seconding @hydn by citing Dual-Boot Linux and Windows: 5-Minute Install Guide | LinuxBlog.io

Install Windows first: If you haven’t installed anything yet, install Windows before Linux. Windows installers don’t gracefully detect Linux, whereas Linux installers will detect Windows and set up a bootloader for both. The general best practice is Windows first, Linux second for dual-boot setups.

3 Likes

Hi @ugnvs , many thanks for your message!

Indeed, I’ve read that post, but that would require to reinstall my Linux too, but without being sure whether, eventually, dual-boot would work or not :thinking:

That’s why I was asking if anyone has tried that kind of installation recently, because that might be in fact a new set up.

I believe that MSFT has talent to ensure that Windows and Linux can be installed and working side-by-side (that used to be the case for me), and they can do brilliant stuff.

Having said that, the configuration I got this time out-of-the-box, right after this install, makes me think of MSFT"s version of Google’s Chromebook workstation model. That’s just an observation but again, that why I looked to know if there are similar installs around where things happened the same way.

2 Likes

There are too many instances of Windows intentionally (or otherwise) messing things up for Linux in a dual-boot environment that I believe you statement to be … and I say this respectfullydoesn’t reflect reality as it is!

4 Likes

HI @ericmarceau, no worries at all, I understand what you are saying : I just tried to be very considerate in my statement. But we never know, if the issue I have identified is to be solved, we may notice soon an offer at MSFT for a lucrative position of “Linux and Windows coexistence Global Lead” - … or not :smile:

4 Likes