I'm currently dual booting Ubuntu 22.04 and Windows 10. Each is on its own separate drive. I would like to create a Hyper-V VM to boot to the Ubuntu drive in Windows 10.
I found this question on a different stack, but I ran into the issue where I could not take the disk offline, with the error "Disk attributes may not be changed on the current system disk or BIOS disk 0". I found this answer on yet another stack which gave the reason as being that there is a Microsoft boot partition, with the solution given to be "to remove the UEFI loader on the drive by deleting /boot/EFI/Microsoft and using efibootmgr, and update-grub" with further steps involving "copying shimx64 and grubx64 to /boot/EFI/boot, rename shimx64 to bootx64". However, unfortunately it is rather light on the details and does not have sufficient information for me know what to do.
As the solution appears to be something I need to do on the Ubuntu side, I am asking on this stack and not on one of the two linked stacks. I think what I need to do is to somehow remove the UEFI partition and then set up Ubuntu to boot without it from the drive it is on. Ideally I do not want to touch the drive that Windows is on both for fear of messing something up there and the fact that I do not like the GRUB menu. Currently I have to hit F12 during startup to get a BIOS menu in order to boot Ubuntu and I actually like that as I would like to normally boot to the same drive and only boot to the other in rare circumstances (and I don't want an unsightly menu that takes 30 seconds by default to go on with the default choice.)
But how can I remove the UEFI partition and still boot to the drive when I select the Ubuntu drive in the BIOS? I think all the steps about efibootmgr, update-grub, shimx64, etc. are involved, but I have no idea exactly what I need to do.
I also found this question which seems similar but appears to be different enough that I don't think the answer there would work here.
Update: I tried renaming all the windows directories on the EFI partition from Linux and discovered that I could no longer boot into Windows. I think looked closer and discovered that when Windows installed itself, despite my best efforts and believe that it was creating an EFI partition on the same drive that Windows was being installed on, it in fact used the existing EFI partition on the Ubuntu drive, which is not what I wanted. So I guess this question needs to be closed as invalid, and I need to create a new question on a different stack.