Can I change boot loader from GRUB2 to GRUB2 for EFI from YAST?

I had been running Leap 42.2, installed on sda1 of a GPT partitioned SSD.
sda2 is swap & sda3 is the system partition.
Recently I installed Leap 15 on sda4, but mistakenly set it to boot from the partition, so sda4 is now legacy bootable.
Everything works OK, but I’d like to correct my error.

My question is, can I correct this from YAST by simply changing the boot loader from GRUB2 to GRUB2 for EFI, or is there more to it than that?

http://susepaste.org/34316630

If you are booted in EFI mode, then you can change in Yast. Otherwise Yast will give an error.

(It’s late at night here. I’ll comment more in the morning about how to change this).

Thank you.

I’m back after a good sleep.

If I understand correctly, then you have Leap 42.2 already installed, and booting with UEFI. If that’s the case, things should be relatively easy.

Step 1: Boot with UEFI into 42.2. If the boot menu already gives you a choice to boot Leap 15.0, then just do that. If not, boot into 42.2 and update grub:


cd /boot/grub2
grub2-mkconfig -o grub.cfg

That has to be run as root.

Now, reboot with UEFI and the boot menu should now have an option for 15.0. Select that, so that you are booted into 15.0.

When in 15.0, you will need to mount your EFI partition as “/boot/efi”. You should actually be able to use Yast partitioner for that.

Once that is done, you will be able to use Yast bootloader to switch to UEFI booting. When you get into Yast bootloader, it should say Bootloader: grub2
Switch that from “grub2” to “grub2 for EFI”. Click OK (or “Finish”). And that should set it up for you.

The requirements for this to work:

(1) You must be running in EFI mode. The command “efibootmgr” must give output other than an error message.
(2) You must have the EFI partition mounted at “/boot/efi”.

That went smoothly. All seems to be working as it should, although I note that the legacy boot flag is still set on the Leap 15.0 partition. Is this significant? Should I clear it?

Output from efibootmgr is now:

john@linux-xxxx:~> sudo efibootmgr
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0000,0003,0002,0001
Boot0000* opensuse
Boot0001* Hard Drive 
Boot0002* CD/DVD Drive 
Boot0003* UEFI OS
Boot0004* opensuse-secureboot
john@linux-xxxx:~> 

Boot0000 is Leap 42.2
Boot0001 is ???
Boot0003 is an incompletely installed distro on a separate HDD.
Boot0004 is Leap 15.0

I’m glad to hear that.

All seems to be working as it should, although I note that the legacy boot flag is still set on the Leap 15.0 partition. Is this significant? Should I clear it?

If everything is working, then it doesn’t matter. Some UEFI Firmware (BIOS) is very fussy and won’t work properly with UEFI if there are legacy boot flags. But most don’t care.

Personally, I would probably clear it, because I’m a purist about those kinds of things.

Output from efibootmgr is now:

john@linux-xxxx:~> sudo efibootmgr
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0000,0003,0002,0001
Boot0000* opensuse
Boot0001* Hard Drive 
Boot0002* CD/DVD Drive 
Boot0003* UEFI OS
Boot0004* opensuse-secureboot
john@linux-xxxx:~> 

Boot0001 (shown as Hard Drive) is likely the fall back. It will boot based on what is in “/EFI/Boot” relative to the EFI partition. This is used when there is nothing NVRAM that defines a named system.

You can use

efibootmgr -v

for more information, which might be hard to decipher.

OK. Thank you for your help.
More reading for me to do, but this experience will help my understanding.