So I was installing openSUSE from a flash drive late one night and accidentally installed it in Legacy mode. Now when I want to go back to UEFI, Windows 10 will not boot up. A prompt appears, saying ‘No bootable device found.’ Before I realized I did it in Legacy mode, I thought I wrote over Windows 10. But looking at the partitions, the Windows file system is still there. My plans were to dual boot openSUSE and Windows 10, so if anyone has a solution for this problem it would be greatly appreciated. Let me know if you need more information.
The first thing to check, is that the disk drive is using GPT partitioning. The output of “fdisk -l” or of “parted -l” should tell you that. If it is still GPT partitioned, then you just have to boot to UEFI mode.
How to boot to UEFI mode – it depends. This varies between computers. For my main desktop, hitting F12 while booting gives me a choice. For my other UEFI box, it is something that I can configure in the BIOS settings.
Some computers will only boot to legacy mode if the “pmbr_boot” flag is set. Try a google search for “pmbr_boot”.
If you get it back to booting in UEFI mode, then you might not be able to boot openSUSE. That can actually be fixed. But, to fix it, you need to boot into the installer in UEFI mode – or boot into a live system (such as a live Tumbleweed) in UEFI mode, and fix from there.
I’ll stop at this point. If you are able to get it back to UEFI booting, and are able to boot the install media or similar to UEFI mode, then we can continue with what to do after that.
According to the output I get from “fdisk -l” it is still GPT partitioned and the “pmbr_boot” flag is set. I don’t have any issues booting into UEFI mode. There’s just no OS to boot from once I’m in UEFI mode. For my station, F2 is to open firmware setup where I can enable Legacy or UEFI and F12 is to look at boot options. When I click F12 in UEFI mode, there are no options to boot from.
Then this guide https://forums.opensuse.org/showthread.php/528400-Repair-a-broken-UEFI-GRUB2-openSUSE-boot-scenario might help you to make your openSUSE booting in UEFI-mode.
Do you still have an UEFI system partition?
If so, does it still have a directory “EFI/Microsoft/Boot” with files like “bootmgr.efi” or “bootmgfw.efi” in it?
If not, you probably lost your MS-Windows-UEFI-bootloader.
Do you still have an entry for MS Windows in your UEFIs NVRAM? You can check with the openSUSE rescue system using
# efibootmgr -v
Regards
susejunky
Yes, I still have an UEFI system partition. I looked inside the 'Boot" folder under “Microsoft” and both of those files are still there. However, when I run
# efibootmgr -v
I get a message “EFI variables are not supported on this system.”
That happens because you booted in legacy mode. If you can boot the install media in UEFI mode, then select “rescue system” from the menu. And run “efibootmgr -v” from there.
Alright, I booted in UEFI mode and then went to rescue system and ran “efibootmgr -v.” It returned the boot order which for me is: flash drive, hard drive, and then DVD drive. Was there supposed to be something more to it?
There should be an entry like
Boot0000* Windows Boot Manager VenHw(...................
which would boot MS Windows.
Regards
susejunky
I might be in trouble here because that isn’t an option that’s listed.
Okay, good.
Presumably you booted the DVD drive or the USB flash drive to get into the rescue system in UEFI mode. If you can boot the hard drive in UEFI mode, in the same way, that should get you into Windows – assuming a typical setup.
I think you may need to remove (unset) that pmbr_boot flag. It is probably getting in the way of using UEFI. But then you might not be able to boot openSUSE. But you should still be able to UEFI boot into the rescue system with install media. And that’s enough to fix openSUSE to use UEFI booting.
Maybe experiment with that. And then I can fill in the details on setting up openSUSE for UEFI boot. I don’t want to suggest that change before you experiment.
Did you remove or reuse the small EFI boot partition that is formatted as DOS32? Removing or overwritting that can mess up the whole EFI boot scheme
Show us fdisk -l
Get your openSUSE to boot in UEFI-mode (use the link i gave you earlier).
GRUB2 will enroll in your UEFIs NVRAM and will be able to start your MS Windows (as long as you have the necessary bootloader files in the EFI system partition).
There will be ways to get your MS Windows to enroll in your UEFIs NVRAM as well … but i’m sorry, i don’t know them.
Regards
susejunky