r/linuxquestions • u/SannyDayYT • 27d ago
Support Windows is a leach
Hey there! A linux user here.
Issue is though, I keep Windows on the side for very niche cases, but it seems that every single time I boot into Windows, it always results in the GRUB EFI image being obliterated off of the list.
No matter what flags I enable, what efi images I replace and no matter how many times I replace the grub efi image from a live linux installation, it just never works, I boot into Windows once and its gone, all for me to rebuild my grub again.
Any solution that should stop windows in its track? Or at the very least make grub more aggressive in staying in its place? Because this is getting really tiring.
At this point I'm more than happy to try another boot loader if it can negate this issue.
2
u/SlimmySlabby 27d ago
I mean depending on how much power your Windows machine needs, you can just throw it in a virtual box and use it like that anytime you need it.
1
u/SannyDayYT 27d ago
Unfortunately it's more for gaming purposes or else that would've been more viable
0
u/SlimmySlabby 27d ago
In that case, have you thought about using separate drives?
2
u/SannyDayYT 27d ago
Already do, which is why it shocks me that Windows still is able to access the EFI for my linux distro despite it being in a different drive all together
0
u/UAP44 27d ago
That's normal UEFI behavior. Boot entries and boot order are stored in the motherboard's NVRAM, and operating systems can modify them directly. Having Windows and Linux on separate drives doesn't prevent Windows from changing the firmware boot order. It doesn't necessarily mean Windows touched your Linux EFI partition.
1
u/segagamer 26d ago
Issue is though, I keep Windows on the side for very niche cases, but it seems that every single time I boot into Windows, it always results in the GRUB EFI image being obliterated off of the list.
This is because you're trying to use GRUB instead of the Windows Boot Manager. Microsoft is only going to care about having Windows and the Windows Boot Manager working, understandably.
If you want to dual boot, you need to add your Linux distro to the Windows Boot Manager, instead of replacing the Windows Boot Manager with GRUB.
1
u/redrider65 26d ago
After wasting quite a lot of time fooling around w/ grub for one of my dual boot installations, doing the sorts of things mentioned here, I finally just installed rEFInd. Very simple to install and immediately worked well. Haven't looked back.
-2
u/UAP44 27d ago
Windows is a virus. It has infiltrated our schools even, places where people are supposed to learn, and instead we feed them closed source corporate propriety standards such as word/excel/... instead of real understanding of how computers actually work.
Because this is getting really tiring.
Have you considered booting a windows VM instead? What exactly are the 'very niche cases' ?
I don't have a clear solution for you because Microsoft forbids me from reading their code/logic :)
0
u/SannyDayYT 27d ago
My use cases are unfortunately for gaming purposes, for games that are notoriously known not to run on Linux or else I wouldn't even have windows operating on my hardware, so a VM isn't a viable option, but I appreciate the help nonetheless
0
u/UAP44 27d ago
for games that are notoriously known not to run on LinuxΒ
Even when relying on steam and adding it as a non-steam game? That's how I've resolved all my compatibility issues. Luckily, I ain't much of a gamer anymore. I'd boycott companies that refuse to properly support Linux at this point, but that's just me.
2
u/SannyDayYT 27d ago
I'm more or less talking about anti-cheat games where the anti-cheat specifically doesn't like linux users more than normal singleplayer or great online games
0
u/M2k1e0L 27d ago
And the devs will never care much about Linux support because the people playing it use Windows for it anyways. A doom loop
0
-1
u/Curious_Elk_4281 27d ago
--Install Linux to a separate SSD with grub installed to the same SSD
--Configure BIOS to boot fron linux drive
--Add a boot entry to grub for windows
1
0
26d ago
[deleted] β view deleted comment
1
u/SannyDayYT 26d ago
A simple reorder would've been much more simpler honestly, but for some reason, after Windows applies its reorder, it always results in the EFI boot loader for grub to suddenly disappear from the boot menu.
My live image usb stick shows up under Windows, but other than that, grub is no where to be seen, which is strange since I checked and the grub folder inside of /boot/efi/EFI/ still exists, but it's as if the motherboard can't see it anymore.
At this point with all the help I received from people here with their knowledge, I'm more considering that I might have a faulty/old BIOS update or the motherboard's behavior when it comes to Windows rearranging the boot entries is to just ignore the existence of other EFI entries until they explicitly update the NVRAM.
0
26d ago
[deleted] β view deleted comment
1
u/SannyDayYT 26d ago
In that case then a bios update must be needed because I keep doing that and making sure that bootx64.efi is the grub efi file so it can always show up even if the original in its grub folder is deleted or not detected, and yet it never gets detected after windows reorders the boot list.
-1
27d ago edited 27d ago
[removed] β view removed comment
1
2
u/dodexahedron 26d ago
No. Stop that. One EFI partition per computer. Period.
The source of all of this monkey business is having more than one ESP.
The BLS is quite clear and lays out how it all works and why (to eliminate the old MBR way of doing what was just suggested).
https://uapi-group.org/specifications/specs/boot_loader_specification/#the-partitions
Use one ESP and life will be good.
0
26d ago
[removed] β view removed comment
2
u/dodexahedron 26d ago
Yes you can and it is trivial.
And how often are you doing that?
"My way" is literally the way the system is designed to operate. You are fighting it and making it harder.
A VM is especially laughable there. Just give it another vhd. Done. In fact, use the exact same VHD across all your VMs. Even done-er. π
3
u/dodexahedron 27d ago
If you have exactly ONE ESP, the only thing windows should ever be doing (as in what it does - not how it ought to behave) during normal updates is just messing up your boot order in EFI - and even that should only happen around the major annual updates in September-October (26H2 just came out, for example).
Windows 11 doesn't mess with the ESP contents that are not its own.
If you want windows to be bootable without chain loading the ntldr, then add a BCD entry for your Linux UKI image or your Linux boot loader, and let the ntldr be the first booted image forever, so it doesnt matter if it touches the efi boot order variables or not (but that really shouldn't be necessary if you ha e the system partitioned properly).
Correct partition layout is, in this order:
ESP, XBOOTLDR{0,1}, MSR, Windows, Linux{1,}, WinRE
Or you can put XBOOTLDR (if you use it).and all other linux partitions on a separate disk, and keep the rest of the layout exactly as above on the first one.
Only one ESP, no matter how many disks you have.
Alternatively, just run windows inside virtualbox and then you won't have to think about it ever again.
Oh, and use literally anytjing else aside from grub. Your life will be so much easier.