Hello,
I have installed Leap 15.2 on a machine with Windows 10 and it appears that it’s a Legacy install instead of UEFI because I cannot find a way to boot into Windows 10. When I run the “efibootmgr -v” command in Konsole I get “EFI variables are not supported on this system”. Also, boot loader in Yast states GRUB2 under Boot Code Options, “Boot from Master Boot Record” is marked, “Set active Flag in Partition Table for Boot Partition” is marked and “do not change” appears under Protective MBR flag. Is switching to UEFI as simple as changing “GRUB2” to “GRUB2 for EFI” under Boot Loader drop down and clicking OK? I want to proceed with caution here as I don’t want to freeze the machine and not be able to log into anything. Any help with fixing this so I can have access to both systems would be greatly appreciated.
Unfortunately, that will fail, with about the same error message that you got running “efibootmgr”.
To fix this, you first need to be able to boot to UEFI mode.
Start with the install media. See if you can manage to boot that in UEFI mode. If you can boot it in UEFI mode to the rescue system, then it is fairly easy to switch your system.
If you no longer have the install media, then try downloading the live Leap 15.2 media. Again, see if you can manage to boot it to UEFI mode. It might require BIOS configuration changes.
When you are able to boot something (original install media or live media) to UEFI mode, tell us how you did that. And I can give you the next steps to complete your switchover.
nrickert](https://forums.opensuse.org/member.php/49759-nrickert)
I started up the computer with the USB installation media inserted, selected Rescue System from the options and I’m now looking at “openSUSE Leap 15.2 Rescue System” and “rescue login:” on the screen. I’m not sure if there is a way to verify if it’s booting in UEFI mode at this stage. What are the next steps from here?
Thank you.
At the login prompt, you can login as root (password not required).
Then run the command:
efibootmgr -v
If you booted with UEFI, you will get a list of boot choices. Otherwise you will get that error message about “efivars”.
Maybe this will make it easier. I did a blog post on installing Leap 15.2. There are images of the installer boot screen, both for legacy booting and for UEFI booting. If you get used to the difference between those, it will be easier to tell how you are booting. Note that you can click on those images to enlarge them, as needed.
1: Mount your root partition at “/mnt”. It will be something like:
mount /dev/sda3 /mnt
except that it probably isn’t “sda3”. I’m assuming that you know which partition is which.
2: Mount your EFI partition at “/mnt/boot/efi”. You might need to first
mkdir /mnt/boot/efi
if that directory does not exist.
3: Some bind mounts:
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
Next we go to “chroot” mode. I’ll give the commands needed. Any line that starts with “###” is just my comment, and you need to type that in.
chroot /mnt
### this starts a session that see "/mnt" as the root file system
mount -a
### that mounts anything missing. In particular, it mounts "btrfs" subvolumes.
yast
### this should start a command line "yast" session. You want to go to the boot loader section
The command line session is a little awkward to use, but I think you can get it to work.
Make the changes that you mentioned in your first post in this thread:
“GRUB2” is changed to “GRUB2 for EFI”
If there is a box about the protective MBR flag, set that to remove flag.
Select OK. And you should be done.
exit
### exit the chroot session
shutdown -r now
### reboot, and see what happens
Thanks so much for all the instructions above! Below is the plan that I’m going to follow and we’ll see if it works. If you are able to take a look at it and see if I missed anything or if anything looks wrong that would be great and feedback is really appreciated.
The challenge I’m facing is at the end of Yast setup. Apparently Yast needs to install two packages (grub2-x86_64-efi and mokutil) but it cannot access the website with files. I’m hardwired to the router and the internet connection worked great while running OpenSUSE Leap 15.2 OS so I don’t think that’s the problem here. Is there maybe a way to download these files on another machine, put on a USB drive and then point Yast to the USB instead of the web after the drive with the files is plugged into the machine that’s going through the system rescue? Are there maybe other options you can recommend?
It might be easiest to boot the system the old way (BIOS/MBR) and install those package first before you go to rescue mode.
Or:
When I use rescue mode, in addition to the bind mounts that I mentioned, I also use:
mount --bind /run /mnt/run
mount --bind /tmp /mnt/tmp
The first of those makes “resolv.conf” available to the system being rescued, and for me that’s enough to allow downloading packages.
The second is because I use “tmpfs” for “/tmp” so binding “/tmp” means that temp files don’t go in the bare “/tmp” directory of the system being rescued.
After finishing all the steps we discussed the current situation is as follows:
With BIOS set to Boot Manager first and Hard Drive second the computer boots directly into Windows without presenting any options at startup. Windows works fine.
With BIOS set to Boot Manager second and Hard Drive first the GRUB menu loads. (https://photos.app.goo.gl/pitiu7nr8yrJdQy48)
2a. When openSUSE Leap 15.2 is selected from the GRUB menu two errors are returned: "can’t find command ‘linuxefi’ and can’t find command ‘initrdefi’. Pressing any key to continue cycles back to the GRUB menu. (https://photos.app.goo.gl/5YWyVUqvaJKN5sWH6)
2b. When Windows Boot Manager is selected from the GRUB menu “error: invalid signature” is returned. Pressing any key to continue cycles back to the GRUB menu. (https://photos.app.goo.gl/vYZA9oTrQbA9BPzQ9)
Could this situation have something to do with Window Fast Boot setup (shot in the dark here) or does it seem like it’s related to openSUSE?
Any ideas? I feel like we’re close to solving this whole Legacy to UEFI situation.
Just an update on this post. I booted the system the old way and installed the two needed packages. Then I restarted in UEFI mode from the installation media and completed all the steps in rescue mode including:
mount --bind /run /mnt/run
mount --bind /tmp /mnt/tmp
After restart with BIOS set to Hard Drive first and Boot Manager second I’m not able to log into openSUSE or Windows from the GRUB menu. Details are outlined in my previous post.
When running windows, try holding the shift key while clicking “Restart”.
That should give you a choice to boot from a device. When you select that choice, is there an option to boot opensuse (or opensuse-secureboot)? If there is, try that option.
After selecting “use a device” on the first screen and “Hard Drive” on the second screen the machine goes to the GRUB menu but it’s impossible to get into opensuse or windows from there. Same errors as before.
It looks as if it still wants to use legacy booting. It recognizes that USB device for UEFI booting, but apparently it doesn’t recognize anything else except perhaps Windows.
It might be one of those computers with a broken implementation of UEFI that only works properly for Windows.
Can you boot linux with UEFI (could be from USB or DVD), and give us the output from
efibootmgr -v
There’s no need to mount any disks for that. It is just giving information about what the firmware knows.