Solution: When I formatted all my drives to install Linux on one and Windows on the other, I kept both connected and they share EFI boot partition as a result. Every time I reinstall Linux it formats the drive and therefore deletes the Windows’s EFI Boot as well. One way is to fix this is to reinstall Windows while disconnecting the drive you have Linux on. Or you can move the boot files if you don’t want to do that.
I used this guide: https://forums.tomshardware.com/threads/changing-windows-boot-manager-drive.3571420/post-21561626
Also remember to delete the Microsoft folder in the boot folder on Linux after you’ve checked that the new boot loader is working.
OP:
Currently dual booting as I need Windows for a few tasks and ganes Linux just won’t do. Since setting everything up I’ve reinstalled Linux twice, both times I’ve lost the ability to boot into windows and have needed to reinstall it.
Disk doesn’t show at all in Grub, tried all kinds of things but it just doesn’t show as a bootable OS. It doesn’t show in the boot options in the BIOS or the boot menu for my motherboard. Drive shows up and all the files are still on it. So my guess is the Windows bootloader somehow installs on the same disk that I have Linux on.
I run Linux(Fedora) and Windows on two separate drives.
Windows take forever to install. Anything I can do now to prevent this from happening if I need to reinstall Linux or if I wanna to some distro hopping?
Just to be clear, everything is working right now. But I want to prevent having to reinstall Windows every time I change distro or reinstall my Linux OS
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 disk 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.
You comment comes off as pretty hostile, why?
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.