Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 31 additions & 11 deletions live/config-cdroot/fix_bootconfig.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@ fi
# but that's not the case.
test -f $dst/.profile && . $dst/.profile

arch=`uname -m`
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
#
cat >$dst/boot/grub2/grub.cfg <<XXX
# kiwi generated one time grub2 config file
# Agama generated grub2 config file
set btrfs_relative_path="y"
export btrfs_relative_path
search --file --set=root /boot/0x11cebed2
Expand All @@ -43,10 +53,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
Expand All @@ -62,26 +72,26 @@ 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
menuentry "$kiwi_iname" --class os --unrestricted {
menuentry "Install $label" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/aarch64/loader/linux \${extra_cmdline} \${isoboot}
echo Loading initrd...
initrd (\$root)/boot/aarch64/loader/initrd
}
menuentry "Failsafe -- $kiwi_iname" --class os --unrestricted {
menuentry "Failsafe -- Install $label" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/aarch64/loader/linux \${extra_cmdline} \${isoboot} ide=nodma apm=off noresume edd=off nomodeset 3
linux (\$root)/boot/aarch64/loader/linux \${extra_cmdline} \${isoboot} ide=nodma apm=off noresume edd=off nomodeset 3
echo Loading initrd...
initrd (\$root)/boot/aarch64/loader/initrd
}
menuentry "Mediacheck" --class os --unrestricted {
menuentry "Check Installation Medium" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/aarch64/loader/linux mediacheck=1 plymouth.enable=0 \${isoboot}
Expand All @@ -99,6 +109,16 @@ if [ "\${grub_platform}" = "efi" ]; then
set textmode=true
terminal_output console
}
menuentry "UEFI Firmware Settings" {
fwsetup --is-supported
if [ "$?" = 0 ]; then
fwsetup
else
echo "Your firmware doesn't support setup menu entry from a boot loader"
echo "Press any key to return ..."
read
fi
}
fi
XXX

12 changes: 9 additions & 3 deletions live/config-cdroot/fix_bootconfig.ppc64le
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,33 @@ fi

chmod 644 $boot_dir/{initrd,linux}

arch=`uname -m`
profile=$(echo "$kiwi_profiles" | tr "-" " ")
label="$profile ($arch)"

# Create grub.cfg.
#
cat >$dst/boot/grub2/grub.cfg <<XXX
# Agama generated grub2 config file

gfxmode=auto

set default="$kiwi_iname"
set default="Install $label"

insmod gettext

if sleep --interruptible 0 ; then
timeout=60
fi

menuentry "$kiwi_iname" --class os --unrestricted {
menuentry "Install $label" --class os --unrestricted {
echo 'Loading kernel...'
linux /boot/ppc64le/linux
echo 'Loading initrd...'
initrd /boot/ppc64le/initrd
}

menuentry "Check Installation Media -- $kiwi_iname" --class os --unrestricted {
menuentry "Check Installation Medium" --class os --unrestricted {
echo 'Loading kernel...'
linux /boot/ppc64le/linux mediacheck=1 plymouth.enable=0
echo 'Loading initrd...'
Expand Down
43 changes: 31 additions & 12 deletions live/config-cdroot/fix_bootconfig.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@ fi
# but that's not the case.
test -f $dst/.profile && . $dst/.profile

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
#
cat >$dst/boot/grub2/grub.cfg <<XXX
# kiwi generated one time grub2 config file
# Agama generated grub2 config file
set btrfs_relative_path="y"
export btrfs_relative_path
search --file --set=root /boot/0xebe87947
Expand All @@ -43,10 +53,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
Expand All @@ -62,26 +72,26 @@ 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
menuentry "$kiwi_iname" --class os --unrestricted {
menuentry "Install $label" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/x86_64/loader/linux \${extra_cmdline} \${isoboot}
echo Loading initrd...
initrd (\$root)/boot/x86_64/loader/initrd
}
menuentry "Failsafe -- $kiwi_iname" --class os --unrestricted {
menuentry "Failsafe -- Install $label" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/x86_64/loader/linux \${extra_cmdline} \${isoboot} ide=nodma apm=off noresume edd=off nomodeset 3
linux (\$root)/boot/x86_64/loader/linux \${extra_cmdline} \${isoboot} ide=nodma apm=off noresume edd=off nomodeset 3
echo Loading initrd...
initrd (\$root)/boot/x86_64/loader/initrd
}
menuentry "Mediacheck" --class os --unrestricted {
menuentry "Check Installation Medium" --class os --unrestricted {
set gfxpayload=keep
echo Loading kernel...
linux (\$root)/boot/x86_64/loader/linux mediacheck=1 plymouth.enable=0 \${isoboot}
Expand All @@ -107,6 +117,15 @@ if [ "\${grub_platform}" = "efi" ]; then
set textmode=true
terminal_output console
}
menuentry "UEFI Firmware Settings" {
fwsetup --is-supported
if [ "$?" = 0 ]; then
fwsetup
else
echo "Your firmware doesn't support setup menu entry from a boot loader"
echo "Press any key to return ..."
read
fi
}
fi
XXX

8 changes: 8 additions & 0 deletions live/src/agama-installer.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Feb 7 08:10:46 UTC 2025 - Ladislav Slezák <lslezak@suse.com>

- 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 <lslezak@suse.com>

Expand Down
46 changes: 25 additions & 21 deletions live/src/agama-installer.kiwi
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
<specification>Agama Live ISO</specification>
</description>
<profiles>
<profile name="Leap" description="openSUSE Leap image" import="true" />
<!-- use at most 16 characters for the profile name, it is used in the ISO Volume ID -->
<!-- which is limited to max. 32 characters -->
<profile name="Leap-16.0" description="openSUSE Leap image" import="true" />
<profile name="openSUSE" description="openSUSE multiproduct image" import="true" />
<profile name="SLE" description="SLE-based image" import="true" />
<profile name="openSUSE-PXE" description="openSUSE OEM image for remote instalaltion" import="true" />
<profile name="Leap-PXE" description="openSUSE Leap OEM image for remote installation" import="true" />
<!-- TODO: add SPx in the future -->
<profile name="SUSE-SLE-16" description="SLE-based image" import="true" />
<profile name="openSUSE-PXE" description="openSUSE OEM image for remote installation" import="true" />
<profile name="Leap-16.0-PXE" description="openSUSE Leap OEM image for remote installation" import="true" />
</profiles>
<preferences>
<version>11.0.0</version>
Expand All @@ -26,24 +29,25 @@
<bootsplash-theme>bgrt</bootsplash-theme>
<bootloader-theme>openSUSE</bootloader-theme>
</preferences>
<preferences arch="ppc64le" profiles="openSUSE,SLE,Leap">
<type image="iso" flags="dmsquash" firmware="ofw" mediacheck="true" volid="agama" editbootconfig="fix_bootconfig">
<!-- the ISO Volume ID is set by the fix_bootconfig script -->
<preferences arch="ppc64le" profiles="openSUSE,SUSE-SLE-16,Leap-16.0">
<type image="iso" flags="dmsquash" firmware="ofw" mediacheck="true" editbootconfig="fix_bootconfig">
<bootloader name="grub2" console="serial" timeout="10"/>
</type>
</preferences>
<preferences arch="aarch64,x86_64" profiles="openSUSE,SLE,Leap">
<type image="iso" flags="dmsquash" firmware="uefi" mediacheck="true" volid="agama" editbootconfig="fix_bootconfig">
<preferences arch="aarch64,x86_64" profiles="openSUSE,SUSE-SLE-16,Leap-16.0">
<type image="iso" flags="dmsquash" firmware="uefi" mediacheck="true" editbootconfig="fix_bootconfig">
<bootloader name="grub2" timeout="10"/>
</type>
</preferences>
<preferences arch="s390x" profiles="openSUSE,SLE,Leap">
<type image="iso" flags="dmsquash" mediacheck="true" volid="agama" editbootconfig="fix_bootconfig">
<preferences arch="s390x" profiles="openSUSE,SUSE-SLE-16,Leap-16.0">
<type image="iso" flags="dmsquash" mediacheck="true" editbootconfig="fix_bootconfig">
<bootloader name="custom" />
</type>
</preferences>
<preferences arch="ppc64le" profiles="openSUSE-PXE,Leap-PXE">
<preferences arch="ppc64le" profiles="openSUSE-PXE,Leap-16.0-PXE">
<!-- For some reason the compression results on ppc64le are not as good as on the other archs -->
<type image="oem" filesystem="btrfs" fsmountoptions="compress=zstd:15" firmware="ofw" installpxe="true" installboot="install" kernelcmdline="rd.kiwi.ramdisk ramdisk_size=3174400" volid="agama">
<type image="oem" filesystem="btrfs" fsmountoptions="compress=zstd:15" firmware="ofw" installpxe="true" installboot="install" kernelcmdline="rd.kiwi.ramdisk ramdisk_size=3174400">
<bootloader name="grub2" console="serial" timeout="1"/>
<oemconfig>
<oem-skip-verify>true</oem-skip-verify>
Expand All @@ -55,8 +59,8 @@
<size unit="M">3000</size>
</type>
</preferences>
<preferences arch="s390x" profiles="openSUSE-PXE,Leap-PXE">
<type image="oem" filesystem="btrfs" fsmountoptions="compress=zstd:15" installpxe="true" installboot="install" kernelcmdline="rd.kiwi.ramdisk ramdisk_size=2097152" volid="agama">
<preferences arch="s390x" profiles="openSUSE-PXE,Leap-16.0-PXE">
<type image="oem" filesystem="btrfs" fsmountoptions="compress=zstd:15" installpxe="true" installboot="install" kernelcmdline="rd.kiwi.ramdisk ramdisk_size=2097152">
<bootloader name="custom"/>
<oemconfig>
<oem-skip-verify>true</oem-skip-verify>
Expand All @@ -68,8 +72,8 @@
<size unit="M">1900</size>
</type>
</preferences>
<preferences arch="aarch64,x86_64" profiles="openSUSE-PXE,Leap-PXE">
<type image="oem" filesystem="btrfs" fsmountoptions="compress=zstd:15" firmware="uefi" installiso="true" installpxe="true" installboot="install" kernelcmdline="rd.kiwi.ramdisk ramdisk_size=2097152" volid="agama">
<preferences arch="aarch64,x86_64" profiles="openSUSE-PXE,Leap-16.0-PXE">
<type image="oem" filesystem="btrfs" fsmountoptions="compress=zstd:15" firmware="uefi" installiso="true" installpxe="true" installboot="install" kernelcmdline="rd.kiwi.ramdisk ramdisk_size=2097152">
<bootloader name="grub2" timeout="1"/>
<oemconfig>
<oem-skip-verify>true</oem-skip-verify>
Expand All @@ -88,7 +92,7 @@
<repository type="rpm-md">
<source path="obsrepositories:/"/>
</repository>
<packages type="image" profiles="openSUSE-PXE,Leap-PXE">
<packages type="image" profiles="openSUSE-PXE,Leap-16.0-PXE">
<package name="dracut-kiwi-oem-repart"/>
<package name="dracut-kiwi-oem-dump"/>
<archive name="root-openSUSE-PXE.tar.xz"/>
Expand Down Expand Up @@ -162,7 +166,7 @@
<archive name="root.tar.xz"/>
</packages>
<!-- additional packages for the Leap distributions -->
<packages type="image" profiles="Leap,Leap-PXE">
<packages type="image" profiles="Leap-16.0,Leap-16.0-PXE">
<package name="agama-products-opensuse"/>
<package name="grub2-branding-openSUSE" arch="aarch64,x86_64"/>
<package name="openSUSE-repos-Leap"/>
Expand All @@ -182,7 +186,7 @@
<package name="MozillaFirefox-branding-openSUSE"/>
</packages>
<!-- additional packages for the SLE distributions -->
<packages type="image" profiles="SLE">
<packages type="image" profiles="SUSE-SLE-16">
<package name="agama-products-sle"/>
<package name="grub2-branding-SLE" arch="aarch64,x86_64"/>
<package name="patterns-sles-base"/>
Expand All @@ -197,14 +201,14 @@
<package name="ca-certificates"/>
<package name="ca-certificates-mozilla"/>
</packages>
<packages type="bootstrap" profiles="Leap,Leap-PXE">
<packages type="bootstrap" profiles="Leap-16.0,Leap-16.0-PXE">
<package name="Leap-release"/>
</packages>
<packages type="bootstrap" profiles="openSUSE,openSUSE-PXE">
<package name="openSUSE-release"/>
<package name="openSUSE-release-ftp"/>
</packages>
<packages type="bootstrap" profiles="SLE">
<packages type="bootstrap" profiles="SUSE-SLE-16">
<package name="SLES-release"/>
</packages>
</image>
3 changes: 2 additions & 1 deletion live/src/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading