Isn't it easier to boot using the bios ? zero maintenance. zero chance of an update fucking it up.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Not sure what you mean here. This issue is related to moving Windows’s boot files to a different drive. Only relevant if you want to use the automatic partition option while installing a distro.
Booting in BIOS won’t make any difference whatsoever if the boot loader is gone.
I daily drive Aurora (which is an image based distro) from an m2 caddy on my work laptop.
These kind of distros do not allow for manual partitioning, so they just use the whole drive.
My BIOS is set to prioritize Aurora.
My m2 caddy can be used on any other hardware and Aurora will boot just fine.
This is a completely different scenario?
As I wrote earlier. Windows doesn’t make a new EFI boot partition if there’s one on your system already. Regardless which drive it’s on and which drive you choose to install Windows to. It’s always been that way, I just forgot when I installed Linux on my old Windows drive and reinstalled Windows on a new drive. So when you do install Linux again after this, and choose automatic partitioning, it formats the EFI partition Windows used.
My solution is just how you move the Windows EFI partition and it’s files to a different drive, effectively isolating the Windows boot loader completely from the Linux drive.
I can chose which OS to boot into either by changing boot order in the BIOS, selecting it in the BIOS boot menu or in Linux’s Grub menu.
What Linux distro are you using? To make it not erase the Windows boot manager from the EFI partition simply manually partition, and do NOT mark the EFI partition for formatting, then Linux will add it's own but NOT erase Windows.
I prefer to just move the Windows boot loader so that I don’t have to even think about it. Having Windows’ EFI completely separated is a much better solution in my opinion. But both solutions work all the same.
First of all: You don't have to reinstall Windows to get it's bootmgr EFI and supporting files back into the ESP. Installing those from the CLI in from a booted install media is possible, I did it before. You can even install all of Windows manually if you ever need to, it's just annoying to do with the windows command line tools.
Secondly: I'm not familiar with all distro installers, but surely you can just not format the ESP? Worst case scenario you'd have to use manual formatting I guess, but it's not that difficult.
Thirdly: You said Grub doesn't show the disk. If you mean the Grub command interface didn't show the disk, then the issue is deeper, at a UEFI or hardware level. If you mean there are no boot entries for a Windows install to be selected, then it could be that they were not generated because the Windows bootmgr EFI was not found when Grub got installed. Sometimes just booting back into Linux and running os-prober again might be enough, if the Windows bootmgr EFI is still around. On my distro the os-proper is automatically run when I run grub-mkconfig -o /boot/grub/grub.cfg
I've always used a shared ESP for my dual boot systems and I certainly don't reinstall one OS as the result of a change with the other.
- I know, it’s just way easier to reinstall.
- I didn’t know Windows installed it’s boot loader on the Linux drive until after I formatted the drive. So see point 1.
- Grub didn’t show the Windows boot loader because it was deleted. After reinstalling Windows it shows up again.
You comment comes off as pretty hostile, why?
- Ah that makes sense then. I was confused why you would wipe your ESP over and over when it was shared.
I don't know why it comes off as hostile, it wasn't intended that way. Sorry for not expressing it better!
If the last sentence came across badly, that was more meant to be incredulous that people accept all these workaround instead. There are other comments in here that go to ridiculous lengths to enforce separation, like using the UEFI boot menu to select a disk manually. To me even having two ESPs seems overly cautious, and against the design philosophy. Sharing one ESP is really not an issue (at least as long as you know you're doing it, as you unfortunately found out the hard way).
No worries! 😁
The issue is more or less 100% my own fault. And my solution is just a quick an easy fix to keep it from ever becoming an issue again(hopefully) on my system. I’m now free to format however I see fit on the disk I have Linux on.
If you manually make partitions during the Linux install or just install Windows before making any partitions at all, this is not gonna be an issue.
Fucking hell that’s a real pain in the arse solution you have there.
If you have two drives then one will be sda and the other will be sdb. Install Windows first on sda (which will mean the boot sector is on sda) then install linux to sdb.
When you get to the part in the Linux installation process where it asks where you want the boot partition tell it to install on sda.
Then anytime you want to install and try a different distro just install to sdb with the boot sector on sda and grub will always detect and add Windows to the boot menu.
Ran that configuration for 10yrs zero issues.
This solution took all about 2 minutes. Now it won’t matter what I do when I reinstall Linux. My Windows boot is not on that same drive any more.
If I would have known my Windows boot was on the M.2 drive I install Linux on, I would not tell the Linux installer to format that drive, obviously.
It’s an Issue I created myself by not thinking about Windows’ limitations. But this solution is pretty quick if you already reinstalled Windows again.
Adding the solution to your post is a classy move, and I approve
The solution offended some people it seems like. But I’m sure I’m not alone in creating a problem like this for myself. 😂
I've had Windows and Linux installed on the SAME drive for decades and don't have this issue. Install Windows first because it WILL fuck up the EFI boot partition, that's inevitable because Windows sucks, then install Linux, use the manual partition option and simply select the existing EFI System partition for the EFI and DO NOT mark format, Linux will then install and leave the Windows boot loader in the EFI partition undisturbed.
Linux WILL overwrite the boot block to start grub instead of the Windows boot loader, but most Linux distros will automatically add a chain boot loader entry to the grub menu to allow you to boot Windows, at least Debian and Redhat derived distros will do this, probably a more manual process in Arch derived distros.
If it does become necessary to install Whendoze after Linux, you can use boot-repair to automatically fix the EFI System partition Windows fucked up or you can boot off of a flash drive, and fix it manually.
Last I checked, if you want to dual boot, you HAVE to install Windows first (or disconnect the linux drive before hand), otherwise it will mess with your boot partitions on all drives.
Windows is also prone to mess with boot partitions randomly long after the initial install, so be wary
I saw that you said windows is on SSD and Linux on NVME. Sounds like modern PC. In my case, I use the motherboard's boot menu. It asks which drive I want to boot from. If I need windows, I choose the drive which has it. If I need to reinstall, I remove the other drive. I don't need grub to probe other drives. Plus, grub menu books super clean.
Do you have the os-prober package installed? I haven't used Fedora in over a decade, so I don't know if it's a default or not.
Yes that’s present and working.
Issue is that my BIOS doesn’t find it either. So something happens when I install a linux distro that breaks the Windows boot loader.
When I reinstall Windows, I can update the grub and it shows up. (It’s also back in the BIOS after reinstalling)
I was doing some quick research and saw someone suggest installing each OS with the other drive disconnected. That way you can first get each one working individually and there's no chance of one messing with the other's bootloader.
I was hoping to avoid that, but that’s gonna be my next move.
Unless I forget and break windows again. Words can’t describe how tired I am of choosing the 37 different options during the install, updating the OS 4 times and installing my apps and deleting bloat. 😂 Windows 11 is great and all, but Microsoft loves to make it unbearable to use.
Install Windows, but leave drive open or a partial space on windows drive. When you install Linux, don't let it install the EFI boot into the Windows EFI boot partition. Instead have the partition manager build a new boot partition+root home etc. Grub will install on its own partition, OS prober should find the Windows drive too, and it will add a chainloader entry to grub. Set your machine to always boot from Linux grub, if you want windows you select it in grub and it hands boot over to windows boot. This way they are isolated and Windows never knows that Linux grub exists and will leave it alone.
same, and make sure fast boot or whatever fast start up is disabled in windows
have you tried updating GRUB, or replacing GRUB with something like rEFInd?
Yeah, I have to do that after reinstalling Windows again. Just did and that solves the issue of getting it into Grub so that I wont have tot go through the BIOS.
But when I install Linux, the Windows boot disappears from the BIOS too. Even tried to find it trough the «Repair» options when booting from a Windows USB, but it’s just gone.
Is it possible that Windows and Linux shares UEFI partitions even if they’re on different drives?
Did you install os-prober so that GRUB can look for other OSes?
You could use a separate drive for Linux.
I am. Windows is on a 2.5" Sata SSD while Linux is on an Nvme M.2 drive
Hmm. Windows shouldn't be putting anything on the Linux drive. Maybe disconnect the other drive before installing Windows.
It shouldn’t, but that’s about the only thing I can think of that does this. I already know how to find windows in grub again, but it’s also gone from the BIOS boot options and it happens very specifically after installing Linux on the other disk.
Already installed Windows again so I can’t do that. But I could disconnect the Windows drive when I install Linux.
Maybe asking this on a Windows sub would be easier? I suspect this is a Windows issue and not a Linux one but I’m honestly not sure.
Yeah you could try installing Linux with the Windows drive disconnected. I had Windows and OpenSUSE Tumbleweed installed with two drives on my old PC without any issues.