Bugzilla – Bug 1182891
[Build 91.1] openQA test fails in grub_test - fails boot to the system after installing on uefi
Last modified: 2021-04-20 12:25:19 UTC
## Observation openQA test in scenario opensuse-15.3-DVD-x86_64-install_only@uefi-usb fails in [grub_test](https://openqa.opensuse.org/tests/1651341/modules/grub_test/steps/7) After installing from usb, reboot the machine, entering the installed system via "Boot from harddisk" on installer fails to work. ## Test suite description set HDDSIZE=40 as required for ppc64le (failed w/o it on https://openqa.opensuse.org/tests/390330#step/install_and_reboot/21 ## Reproducible Fails since (at least) Build [90.1](https://openqa.opensuse.org/tests/1649226) ## Expected result Last good: [85.2](https://openqa.opensuse.org/tests/1641629) (or more recent) ## Further details Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=uefi-usb&test=install_only&version=15.3)
aarch64 is also affected: https://openqa.opensuse.org/tests/1651107#step/grub_test/5
Looks not only happened on usb but any scenario that "boot from hard disk" via dvd on uefi.
(In reply to Max Lin from comment #2) > Looks not only happened on usb but any scenario that "boot from hard disk" > via dvd on uefi. The "boot from hard disk" falls through to the uefi menu rather than loading grub from the installed device. On aarch64 the uefi menu even failed to start. A related issue for aarch64 is also tracked at https://bugzilla.suse.com/show_bug.cgi?id=1182776.
Maybe it's https://github.com/openSUSE/installation-images/commit/e7b59903c68148b02e5358be5c164c40bb447a8f related?
It is regression in the grub.cfg ... > mount openSUSE-Leap-15.3-DVD-x86_64-Build90.1-Media.iso /tmp/mnt1 > mount /tmp/mnt1/boot/x86_64/efi /tmp/mnt2 > cat /tmp/mnt2/EFI/BOOT/grub.cfg > ... > menuentry "Boot from Hard Disk" --class opensuse --class gnu-linux --class gnu --class os { > if search --no-floppy --file /efi/boot/fallback.efi --set ; then > for os in opensuse sles caasp ; do > if [ -f /efi/$os/grub.efi ] ; then > chainloader /efi/$os/grub.efi > fi > done > fi > exit > } It will always go to 'exit' even though the search and chainloader command are successful. There seems to have misunderstanding to how the chainloader command worked. It doesn't perform 'boot' immediately, instead it loads image to memory and return to caller script. The image will be booted after the boot command, or the control reaches the bottom of the menu entry's executing block ... That is it should be modified like this ... > menuentry "Boot from Hard Disk" --class opensuse --class gnu-linux --class gnu --class os { > if search --no-floppy --file /efi/boot/fallback.efi --set ; then > for os in opensuse sles caasp ; do > if [ -f /efi/$os/grub.efi ] ; then > chainloader /efi/$os/grub.efi > boot > fi > done > fi > exit > } or ... > menuentry "Boot from Hard Disk" --class opensuse --class gnu-linux --class gnu --class os { > if search --no-floppy --file /efi/boot/fallback.efi --set ; then > for os in opensuse sles caasp ; do > if [ -f /efi/$os/grub.efi ] ; then > chainloader /efi/$os/grub.efi > else > exit > done > else > exit > } .. if you want to add 'exit' as fallback when no suse distro found Hi Steffen, Would you please help to have a look ? Thanks.
(In reply to Michael Chang from comment #5) > or ... > > > menuentry "Boot from Hard Disk" --class opensuse --class gnu-linux --class gnu --class os { > > if search --no-floppy --file /efi/boot/fallback.efi --set ; then > > for os in opensuse sles caasp ; do > > if [ -f /efi/$os/grub.efi ] ; then > > chainloader /efi/$os/grub.efi > > else > > exit > > done > > else > > exit > > } > > .. if you want to add 'exit' as fallback when no suse distro found That else exit would seem to defeat the purpose of the for loop.
Oh, sorry; it's a glitch from merging the different efi grub configs. I will fix this.
(In reply to Andreas Färber from comment #6) > (In reply to Michael Chang from comment #5) > > .. if you want to add 'exit' as fallback when no suse distro found > > That else exit would seem to defeat the purpose of the for loop. Arh. You are right. Sorry for this stupid example, but I hope that helped to capture the idea. Thanks.
fixed (added missing 'boot'): https://github.com/openSUSE/installation-images/pull/464
A note regarding comment 1: On all architectures != x86_64 'local boot' just exits to the UEFI firmware. There's no change here. If you want that changed, please speak up and we can try to find a better solution.
This issue has been fixed in Build94.1 with installation-images 16.48[0] which contain fixed grub-efi.cfg, but now, with Build97.1[1] this issue re-appeared, installation-images still was 16.48[2], I guess new merged SLE change has introduced an regression thus this issue happened again. Michael and Steffen, could you have a look? [0] https://openqa.opensuse.org/tests/1654893 [1] https://openqa.opensuse.org/tests/1661048#step/grub_test/7 [2] https://build.opensuse.org/package/show/openSUSE:Leap:15.3/installation-images
I've checked with openSUSE-Leap-15.3-NET-x86_64-Build97.1-Media.iso and it boots from disk just fine. grub.cfg looks also ok.
I believe this time is caused by grub2 boothole2 backport which prevented the efi chainloader from working ...
Set duplication to bsc#1183073. *** This bug has been marked as a duplicate of bug 1183073 ***