From 28d79237ef24b23551f54a9ab833cb41653d4cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 28 Jan 2025 15:48:24 +0100 Subject: [PATCH 1/5] Use better ISO Volume ID labels (bsc#1236401) - Improve also the boot menu labels --- live/src/agama-installer.kiwi | 46 +++++++++++++++++++---------------- live/src/config.sh | 3 ++- live/src/fix_bootconfig | 19 +++++++-------- 3 files changed, 36 insertions(+), 32 deletions(-) diff --git a/live/src/agama-installer.kiwi b/live/src/agama-installer.kiwi index 4350da69b2..e21daff199 100644 --- a/live/src/agama-installer.kiwi +++ b/live/src/agama-installer.kiwi @@ -9,11 +9,14 @@ Agama Live ISO - + + + - - - + + + + 11.0.0 @@ -26,24 +29,25 @@ bgrt openSUSE - - + + + - - + + - - + + - + - + true @@ -55,8 +59,8 @@ 3000 - - + + true @@ -68,8 +72,8 @@ 1900 - - + + true @@ -88,7 +92,7 @@ - + @@ -162,7 +166,7 @@ - + @@ -182,7 +186,7 @@ - + @@ -197,14 +201,14 @@ - + - + diff --git a/live/src/config.sh b/live/src/config.sh index 607fe25094..c68c27e4da 100644 --- a/live/src/config.sh +++ b/live/src/config.sh @@ -72,8 +72,9 @@ systemctl disable YaST2-Firstboot.service systemctl disable YaST2-Second-Stage.service ### setup dracut for live system -label=${kiwi_install_volid:-$kiwi_iname} arch=$(uname -m) +# keep in sync with ISO Volume ID set in the fix_bootconfig script +label="Install-$kiwi_profiles-$arch" echo "Setting default live root: live:LABEL=$label" mkdir /etc/cmdline.d diff --git a/live/src/fix_bootconfig b/live/src/fix_bootconfig index 26357f7c25..eba03b9208 100644 --- a/live/src/fix_bootconfig +++ b/live/src/fix_bootconfig @@ -55,26 +55,24 @@ for i in "\$@" ; do export iso="\$i" continue fi - if [ -n "\$volid_opt" ] ; then - volid_opt= - export volid="\$i" - continue - fi if [ "\$i" = "-outdev" ] ; then iso_opt=1 continue fi - if [ "\$i" = "-volid" ] ; then - volid_opt=1 - continue - fi done -volid=${kiwi_install_volid:-$kiwi_iname} +# keep in sync with ISO Volume ID set in the config.sh script +volid="Install-$kiwi_profiles-$arch" [ -x $bootfix ] && $bootfix $dst rm -f $dst/fix_bootconfig.* $dst/.profile +# update the boot menu labels +boot_label=\$(echo "$kiwi_profiles" | tr "-" " ") +sed -i -E -e "s/^menuentry \\"$kiwi_iname\\"/menuentry \"Install \$boot_label ($arch)\"/" \ + -e "s/^menuentry \\"Failsafe -- $kiwi_iname\\"/menuentry \\"Failsafe -- Install \$boot_label ($arch)\\"/" \ + $dst/boot/grub2/grub.cfg + case $arch in s390x) /usr/bin/xorriso "\$@" -volid "\$volid" -boot_image any bin_path=boot/s390x/cd.ikr -boot_image any boot_info_table=off -boot_image any load_size=512 @@ -87,6 +85,7 @@ case $arch in ;; *) /usr/bin/xorriso "\$@" -volid "\$volid" + err=\$? esac exit \$err From 1b03a6a862a1a96564f452e55677819bc1a2e7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 28 Jan 2025 21:48:31 +0100 Subject: [PATCH 2/5] Changes --- live/src/agama-installer.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/live/src/agama-installer.changes b/live/src/agama-installer.changes index b3380f4586..01c35edab1 100644 --- a/live/src/agama-installer.changes +++ b/live/src/agama-installer.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 28 15:47:52 UTC 2025 - Ladislav Slezák + +- Use better ISO Volume ID labels (bsc#1236401) +- Improve also the boot menu labels + ------------------------------------------------------------------- Mon Jan 20 10:37:43 UTC 2025 - Imobach Gonzalez Sosa From 87319829690ac473a0021e235a41c9874225d51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Wed, 29 Jan 2025 17:58:04 +0100 Subject: [PATCH 3/5] Refactoring and cleanup - Add UEFI firmware setup option --- live/config-cdroot/fix_bootconfig.aarch64 | 24 +++++++++++++++++----- live/config-cdroot/fix_bootconfig.ppc64le | 12 ++++++++--- live/config-cdroot/fix_bootconfig.x86_64 | 25 +++++++++++++++++------ live/src/fix_bootconfig | 12 ----------- 4 files changed, 47 insertions(+), 26 deletions(-) diff --git a/live/config-cdroot/fix_bootconfig.aarch64 b/live/config-cdroot/fix_bootconfig.aarch64 index 4299976f0e..078a01342b 100755 --- a/live/config-cdroot/fix_bootconfig.aarch64 +++ b/live/config-cdroot/fix_bootconfig.aarch64 @@ -17,11 +17,15 @@ fi # but that's not the case. test -f $dst/.profile && . $dst/.profile +arch=`uname -m` +profile=\$(echo "$kiwi_profiles" | tr "-" " ") +label="$profile ($arch)" + # # Create grub.cfg # cat >$dst/boot/grub2/grub.cfg <$dst/boot/grub2/grub.cfg <$dst/boot/grub2/grub.cfg < Date: Wed, 29 Jan 2025 18:45:08 +0100 Subject: [PATCH 4/5] Properly set the Grub theme --- live/config-cdroot/fix_bootconfig.aarch64 | 20 +++++++++++++------- live/config-cdroot/fix_bootconfig.ppc64le | 2 +- live/config-cdroot/fix_bootconfig.x86_64 | 18 ++++++++++++------ 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/live/config-cdroot/fix_bootconfig.aarch64 b/live/config-cdroot/fix_bootconfig.aarch64 index 078a01342b..af0267ddc5 100755 --- a/live/config-cdroot/fix_bootconfig.aarch64 +++ b/live/config-cdroot/fix_bootconfig.aarch64 @@ -18,9 +18,15 @@ fi test -f $dst/.profile && . $dst/.profile arch=`uname -m` -profile=\$(echo "$kiwi_profiles" | tr "-" " ") +profile=$(echo "$kiwi_profiles" | tr "-" " ") label="$profile ($arch)" +if [ -d "$dst/boot/grub2/themes/SLE" ]; then + theme="SLE" +else + theme="openSUSE" +end + # # Create grub.cfg # @@ -45,10 +51,10 @@ if [ "\${grub_platform}" = "efi" ]; then fi set gfxmode=auto set font=(\$root)/boot/aarch64/loader/grub2/fonts/unicode.pf2 -set ascii_font=grub2/themes/openSUSE/ascii.pf2 -set sans_bold_14_font=grub2/themes/openSUSE/DejaVuSans-Bold14.pf2 -set sans_10_font=grub2/themes/openSUSE/DejaVuSans10.pf2 -set sans_12_font=grub2/themes/openSUSE/DejaVuSans12.pf2 +set ascii_font=grub2/themes/$theme/ascii.pf2 +set sans_bold_14_font=grub2/themes/$theme/DejaVuSans-Bold14.pf2 +set sans_10_font=grub2/themes/$theme/DejaVuSans10.pf2 +set sans_12_font=grub2/themes/$theme/DejaVuSans12.pf2 if [ -f \${font} ];then loadfont \${font} fi @@ -64,8 +70,8 @@ fi if [ -f (\$root)/boot/\${sans_12_font} ];then loadfont (\$root)/boot/\${sans_12_font} fi -if [ -f (\$root)/boot/grub2/themes/openSUSE/theme.txt ];then - set theme=(\$root)/boot/grub2/themes/openSUSE/theme.txt +if [ -f (\$root)/boot/grub2/themes/$theme/theme.txt ];then + set theme=(\$root)/boot/grub2/themes/$theme/theme.txt fi terminal_input console terminal_output gfxterm diff --git a/live/config-cdroot/fix_bootconfig.ppc64le b/live/config-cdroot/fix_bootconfig.ppc64le index 4c1aa6c5bc..c054a3886d 100755 --- a/live/config-cdroot/fix_bootconfig.ppc64le +++ b/live/config-cdroot/fix_bootconfig.ppc64le @@ -75,7 +75,7 @@ fi chmod 644 $boot_dir/{initrd,linux} arch=`uname -m` -profile=\$(echo "$kiwi_profiles" | tr "-" " ") +profile=$(echo "$kiwi_profiles" | tr "-" " ") label="$profile ($arch)" # Create grub.cfg. diff --git a/live/config-cdroot/fix_bootconfig.x86_64 b/live/config-cdroot/fix_bootconfig.x86_64 index 75f10eec82..05be93650c 100755 --- a/live/config-cdroot/fix_bootconfig.x86_64 +++ b/live/config-cdroot/fix_bootconfig.x86_64 @@ -21,6 +21,12 @@ arch=`uname -m` profile=$(echo "$kiwi_profiles" | tr "-" " ") label="$profile ($arch)" +if [ -d "$dst/boot/grub2/themes/SLE" ]; then + theme="SLE" +else + theme="openSUSE" +fi + # # Create grub.cfg # @@ -45,10 +51,10 @@ if [ "\${grub_platform}" = "efi" ]; then fi set gfxmode=auto set font=(\$root)/boot/x86_64/loader/grub2/fonts/unicode.pf2 -set ascii_font=grub2/themes/openSUSE/ascii.pf2 -set sans_bold_14_font=grub2/themes/openSUSE/DejaVuSans-Bold14.pf2 -set sans_10_font=grub2/themes/openSUSE/DejaVuSans10.pf2 -set sans_12_font=grub2/themes/openSUSE/DejaVuSans12.pf2 +set ascii_font=grub2/themes/$theme/ascii.pf2 +set sans_bold_14_font=grub2/themes/$theme/DejaVuSans-Bold14.pf2 +set sans_10_font=grub2/themes/$theme/DejaVuSans10.pf2 +set sans_12_font=grub2/themes/$theme/DejaVuSans12.pf2 if [ -f \${font} ];then loadfont \${font} fi @@ -64,8 +70,8 @@ fi if [ -f (\$root)/boot/\${sans_12_font} ];then loadfont (\$root)/boot/\${sans_12_font} fi -if [ -f (\$root)/boot/grub2/themes/openSUSE/theme.txt ];then - set theme=(\$root)/boot/grub2/themes/openSUSE/theme.txt +if [ -f (\$root)/boot/grub2/themes/$theme/theme.txt ];then + set theme=(\$root)/boot/grub2/themes/$theme/theme.txt fi terminal_input console terminal_output gfxterm From 25e3f271b0548e3156d0992f9fa472a577b043a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Fri, 7 Feb 2025 09:13:26 +0100 Subject: [PATCH 5/5] Changes --- live/src/agama-installer.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/live/src/agama-installer.changes b/live/src/agama-installer.changes index d1795ff4dd..52f970006b 100644 --- a/live/src/agama-installer.changes +++ b/live/src/agama-installer.changes @@ -4,6 +4,7 @@ Fri Feb 7 08:10:46 UTC 2025 - Ladislav Slezák - Use better ISO Volume ID labels (bsc#1236401) - Improve also the boot menu labels - Use the graphical boot menu also in SLE +- Added UEFI firmware settings boot menu option ------------------------------------------------------------------- Tue Feb 4 13:25:35 UTC 2025 - Ladislav Slezák