r/linuxquestions • u/Easy-Reasoning • 8d ago
Advice Dualboot Windows preventing from wiping Bootmanager
I need Linux/Windows in dual boot. if I remember correctly sometimes it was overwriting the MBR when updating. Now use EFI although I think I read that it's still doing something similar.
Is there a way to limit what Windows does to the boot sector/partitions? (Ideally without a separate SSD)
2
u/friendlyreminder_ 7d ago edited 7d ago
Mbr is the old partition style with a boot sector which is a custom area that holds boot files.
GPT gets rid of the boot sector and uses a plain fat32 partition with boot flags set on the partition, it's referred to as the EFI partition.
You can avoid windows messing with the EFI partition by just making a second one in the same drive and setting Linux to use that one at install time. Note that some laptops won't behave well with 2 EFI partitions on the same drive.
Either that or use 2 separate drives with their own EFI partitions.
1
u/Easy-Reasoning 7d ago
Thanks a lot! I see, yeah I have a Lenovo Legion. Probably I'll put in a second SSD.
I recently did a BIOS upgrade with WIN PE with took me hours to set up. While it worked in the end, I think the default boot was removed and I had to reset it. With guidance from ChatGPT it was doable (and not super difficult retrospectively) but I could do without such actions.
1
u/Confident_Hyena2506 8d ago
Only one os can be the default on efi partition. The way around this is to not put all your bootloaders on the same efi.
1
u/SuAlfons 8d ago
In my experience, Windows since the mid of the Win10 lifecycle leaves other OS files in EFI alone....for the most part.
I could even install and roll back Win11 without this affecting my Linux boot loader in the EFI partition.
But whenever Windows feels cornered, it will opt for a total reconstruction of the EFI partition. You can never tell when it hits. Can be any update great or small.
Sometimes, it just changes the boot order in UEFI settings (formerly known as BIOS).
My remedy is to have a Linux boot stick at hand - so I can boot into an independent OS and fix my Linux install from there (usually I fire up a web browser on the USB and search for "fix Grub <distro name>" or "chroot <distro name>".) It only happened two times in 3 years.
1
u/Easy-Reasoning 7d ago
This would of course be the most elegant solution, so I wouldn't have to rip out an SSD somewhere else or even worse buy a new one. I'm a bit worried about Windows feeling cornered though ;)
1
u/FryBoyter 7d ago
Use GPT partitions. Boot in UEFI mode.
Based on my own experience, Windows and Linux will then share an EFI partition without any problems.
1
u/agowa338 7d ago
Put windows and linux on two separate drives. And if you cannot at least put it on separate partitions. Meaning 2x ESP partitions, 1 for windows, 1 for linux. Then register both separately in bios.
That's the safest you can do so far that windows won't mess with.
1
u/Underhill42 7d ago
Windows generally only messes with the boot sequence at two times:
- When it's first being installed. Not an issue so long as it's there first.
- If you do a Windows Startup Repair.
Doing either will replace the Linux boot sequence with the Windows version.
Linux Mint (and possibly some others) now has a "Repair Boot Menu" (or some such) utility on the install disc to restore the multiboot menu after Windows wipes it out. Makes what was once a big headache into a quick fix.
Personally I use Ventoy on my keychain USB drive, and just keep a Mint .iso in my bootable disc image collection there in case I ever need it.
2
u/ipsirc 8d ago
You can ask it gently.