On 07.07.2023 23:09, Adam Vodopjan wrote:
I've just downloaded a fresh tumbleweed iso, namely openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20230705-Media.iso
Inside I see EFI/BOOT/grub.cfg with such lines:
set btrfs_relative_path="yes" search --file --set=root /boot/mbrid set prefix=($root)/boot/grub2 configfile ($root)/boot/grub2/grub.cfg
THE QUESTION IS: Why does it use 'configfile' instead of 'source' there?
There is a confusing side effect this way. Spin the iso up in a EFI system, wait for the grub menu to appear and press Esc. See the grub shell screen? That's game over: you're at the top level grub screen, there is nowhere to return with Esc like you'd do with a generic grub shell started with the 'c' shortcut.
Just do configfile /boot/grub2/grub.cfg again. Anyway - it is the wrong list. Live ISO is created by kiwi, so if you think it should be doing something different - open an issue on kiwi project: https://github.com/OSInside/kiwi As far as I can tell, kiwi used configfile from the very beginning.
Now spin the same iso up in a PC (non-EFI) system, wait for the menu and press Esc. Nothing bad happens.
Well, on legacy BIOS grub is configured to load /boot/grub2/grub.cfg directly. Theoretically, kiwi could just copy /boot/grub2/grub.cfg to \EFI\Boot\grub.cfg.
So there are 2 problems: 1. User experience differs in EFI/non-EFI cases 2. In EFI case an accidental Esc results in a dead-end
Also I downloaded a fresh tumbleweed install iso, namely openSUSE-Tumbleweed-DVD-x86_64-Snapshot20230705-Media.iso, and created a fresh system with it (the iso itseft is good, EFI/BOOT/grub.cfg is self-contained). In the installed system EFI/BOOT/grub.cfg does 'source', not 'configfile'.
Also in /sbin/shim-install I see 'source' as well:
428 cat <<EOF 429 search --fs-uuid --set=root ${cfg_fs_uuid} 430 set prefix=(\${root})`${grub_mkrelpath} ${grub_cfg_dirname}` 431 source "\${prefix}/${grub_cfg_basename}" 432 EOF