You are not logged in.
I have been running a windows dualboot system for year without trouble, but recently every time I boot into windows it seems to completely remove GRUB from UEFI.
My disk layout is as follows. I have two nvme drives, one for Windows and one for Linux. Each has their own boot partition, with grub set to chainload the windows one.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 931,5G 0 disk
├─nvme0n1p5 259:2 0 929,9G 0 part /
└─nvme0n1p6 259:3 0 1000M 0 part /boot
nvme1n1 259:1 0 931,5G 0 disk
├─nvme1n1p1 259:4 0 16M 0 part
├─nvme1n1p2 259:5 0 930,6G 0 part
├─nvme1n1p3 259:6 0 710M 0 part
└─nvme1n1p4 259:7 0 199M 0 part
This has worked fine for years, until last week when I wanted to play some game. At first I thought it was my own mistake so I booted from USB and restored the bootloader with grub-install, but next time I booted into windows it again completely removed grub from the startup options.
The physical boot partition and all the files on it remain, it's just not listed as a bootable option.
I searched around and found this tread that suggested copying the windows bootloader to the grub partition. I did so, and guess what, it removed grub and left two copies of windows.
https://bbs.archlinux.org/viewtopic.php?id=302091
I'm honestly at a loss. I only use Windows for games so if I can't solve this I'm just going to uninstall Windows altogether.
What a rude operating system.
In case it matters, my motherboard is a ASUS TUF GAMING X670E-PLUS. I have no idea what other information could be useful, but I'd be happy to provide it.
Offline
I don't have a solution (short of getting rid of Windows altogether or running it in a VM exclusively). If it can be solved (from Windows side of things) then I don't know how.
My workaround is grub-install with and without --removable (on its own EFI partition separate from the Windows one). USB stick would also work.
That way you can still select Grub from the bios boot menu (F12 or whatever). Still annoying, but a lot less annoying than chrooting from a rescue stick.
Offline
I dropped using grub to boot win/linux long time ago, I just had two different entries in bios and would hit F key at startup to choose which one to boot, grub for windows/linux was always a mess for me they kept fighting over it replacing files on efi/boot partitions. Having two separate drives makes it easy to just boot each from bios options at startup. It's just an extra keypress when I need to go in non-default boot.
Offline
This doesn't seem to be Grub specific. Windows seems to be removing all entries that aren't Windows for some reason.
So as for EFI boot entries, only the "removable" ones survive (since, well, they don't need or have any persistent entry). But there is only one EFI/Boot/bootx64.efi possible on each EFI partition.
For multiple kernels you'd then have to give each its own dedicated EFI partition... not an option for me.
Offline
Windows seems to be removing all entries that aren't Windows for some reason.
Windows gonna windows.
You can have different BIOS efi entries for different kernels, linking different efi stubs. Tried it once and it works, different filename for efi stubs (all on /efi), added in BIOS boot from efi shell with bcfg. Simplest way with no grub headaches.
More clearly, your BIOS already has a boot menu and you can have Windows/arch/arch-hardened/arch-zen entries in BIOS boot menu, just hit F12 or whatever is set for your motherboard, and have the list pop up, you can have more entries linking same OS from same SSD but using different kernels. And you can have all efi files on the same /efi partition.
Last edited by qu@rk (2025-03-28 20:58:04)
Offline
Starting with "Softlanding Linux System", a predecessor to Slackware, I installed my first version of Linux (with a non-modular kernel 0.99p15) parallel to my Windows (which was still a DOS extension) some 30 years ago. After switching to GRUB it was quite "normal" for me to re-install the MBR loader (now "GRUB legacy") after every new Windows installation - but hey - you didn't do that every 12 months.
Fast forward to UEFI, Arch and Windows 10 I preferred a fresh Windows 10 install over the somewhat unpredictable "migration" by Microsoft. Still It was "normal" for me to reinstate the GRUB loader as the default UEFI boot manager entry - so I kept the Arch install USB drive nearby after every fresh Windows 10 install.
At some point in the past that suddenly stopped. I'm not sure when - either the later Windows 10 versions or the first Windows 11 version (21H2). A fresh Windows install or an in-place full upgrade either reinstated the UEFI boot manager entries or left them completely alone. So from my point of view Microsoft became politer in that regard.
Back to the topic.
@pepijndevos: Your partition table on the "Windows" disk looks strange. Can you show us the output of
sudo fdisk -l /dev/nvme0n1
sudo fdisk -l /dev/nvme1n1
?
So as for EFI boot entries, only the "removable" ones survive (since, well, they don't need or have any persistent entry). But there is only one EFI/Boot/bootx64.efi possible on each EFI partition.
For multiple kernels you'd then have to give each its own dedicated EFI partition... not an option for me.
@frostschutz: While "EFI/Boot/bootx64.efi" is the fallback bootloader and can only exist once per EFI partition Windows may also overwrite it with it's own UEFI bootloader (In fact every OS can and may do that).
UEFI firmware implementations have their own logic and may interfere. I had an older mainboard which only allowed one active and visible UEFI boot manager entry. All other entries manually marked visible be me were hidden after the next reboot. This firmware was unusable in a "use the UEFI boot manager instead" scenario.
Offline
@pepijndevos:
Give this a try:
Keep Windows at 1st boot order with efibootmgr and disable it so the next entry (grub) effectively becomes the active one.
This is a very old efi/Windows bug. Maybe you're affected. Windows tries to always be on 1st boot. Not by changing order but by deleting the previous entry completely (from nvram).
sys2064
Offline
Just to be clear: Windows completely removes grub from the F8 boot menu. It's not just about disabling or reordering, it completely delists any mention of GRUB.
> My workaround is grub-install with and without --removable (on its own EFI partition separate from the Windows one). USB stick would also work.
I tried --removable and it doesn't seem to have done anything. Windows still removed GRUB just the same.
> Can you show us the output of fdisk
I'm currently in windows but from here it looks like
> Keep Windows at 1st boot order with efibootmgr and disable it so the next entry (grub) effectively becomes the active one.
Seems like a long shot but I'll give it a try next time I've worked my way back into Linux
Offline
I would generally avoid more than one EFI partition per system.
I never had to deal with a two disk system in that way (only systems with one EFI and one CSM/MBR disk) and most sources don't even mention more than one EFI partition.
Offline
Does Windows install alter files on other drives than the one its being installed on?
Offline
If Windows considers the EFI partition on your "Linux drive" to be the "right one" it definitely will.
Offline
That sounds like malware. Nobody took Microsoft to town for messing with the data in their computer? Once you direct it to install on certain drive it has no business touching any other drive, no matter what.
Offline
Originally I did this because the Windows EFI partition was too small for grub, and I've never had problems with it until recently.
I'm honestly inclined to just go the wine/proton route. It's always a hassle but less of a hassle than reinstalling grub every time.
If Windows wasn't this toxic I'd probably consider using WSL full time but wtf man
Offline
Not sure if you have the same issue as I had but this worked for me:
Ok I solved the issue.
What I had to do was 2 things.
Not sure that the first thing did anything but what that was disable Fast boot in Windows.
That alone did not solve the issue.
The next thing I had to do was go into Windows and run this command at the command prompt.
bcdedit /set {bootmgr} path \EFI\grub\grubx64.efi
I then rebooted and the grub menu was still there.
Online
That's chainloading GRUB from the Windows boot loader. The UEFI firmware starts the Windows EFI boot loader (EFI/Microsoft/Boot/bootmgfw.efi) which in turn loads the grub EFI executable.
Offline
Does this only happen when you boot Windows? For example, does it happen when you boot the ISO on a flash drive?
Online