I had to reinstall my Ubuntu OS after they stopped supporting my version and my upgrade process wasn't easy. Because the package servers for 20.10 were no longer up I couldn't fully upgrade my packages before upgrading. I was able to upgrade from the command line by deselecting all package servers before re-running the command to upgrade to the newer 22.04 LTS. This broke a lot of package dependencies in the upgraded version so I nuked the drive from orbit and installed 22.04 fresh.
Usually I remove all drives from my computer before installing any new OS to prevent bootloader shenanigans, but my new Windows drive is physically difficult to reach so I didn't do that this time, fully aware of the consequences.
As expected, Ubuntu scanned the drives in my computer and installed its boot loader to the Windows drive despite me allocating the entirety of a separate disk for its install.
I've since manually installed grub to the Ubuntu drive, so it can boot itself now, but I want to be able to launch my Windows drive from grub on my Ubuntu drive. os-prober
and update-grub
are not solving this problem.
I've seen many guides like this one for removing Ubuntu from a Windows boot partition, but I don't think that's a complete solution because I can still grep for "Ubuntu" amongst the .efi files on my Windows boot partition and I see entries.
How can I fully uninstall grub from my Windows boot partition? What's the safe way to restore those binary efi files?