From aabb0932bff314b51e223342bd8c519f9b19839a Mon Sep 17 00:00:00 2001 From: "Stefan Cristian B." Date: Mon, 3 Aug 2026 15:03:22 +0300 Subject: [PATCH] livecd_stage2.py: Introducing user-customizable GRUB theme and timeout * introduced livecd/grub_theme spec option to select the GRUB theme path used in the generated ISO grub.cfg * introduced livecd/grub_timeout spec option for the GRUB menu timeout * kept previous behaviour when options are unset (gentoo_frosted theme and 10 second timeout), so existing specs build identically * registered both options in livecd_stage2.py valid_values, exported to iso-bootloader-setup.sh as clst_livecd_grub_theme and clst_livecd_grub_timeout by the existing environment * documented both options in catalyst-spec(5) * great thanks to @immolo for pointing out a lead trace where this could be fixed * this fixes the hardcoded GRUB theme and timeout values introduced in commit 6950b11b5644 (GRUB theme support) by making them configurable through the spec file. Signed-off-by: Stefan Cristian B. --- catalyst/targets/livecd_stage2.py | 2 ++ doc/catalyst-spec.5.txt | 10 ++++++++++ targets/support/iso-bootloader-setup.sh | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py index 6f1eb5bc..98f0eddd 100644 --- a/catalyst/targets/livecd_stage2.py +++ b/catalyst/targets/livecd_stage2.py @@ -24,6 +24,8 @@ class livecd_stage2(StageBase): "livecd/fsscript", "livecd/fstype", "livecd/gk_mainargs", + "livecd/grub_theme", + "livecd/grub_timeout", "livecd/iso", "livecd/iso_extra_partition", "livecd/linuxrc", diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt index 3a74ee1c..410ea5e2 100644 --- a/doc/catalyst-spec.5.txt +++ b/doc/catalyst-spec.5.txt @@ -204,6 +204,16 @@ if USE=system-bootloader is set. The cdtar is essentially the bootloader for the CD. It also holds the main configuration for the bootloader. +*livecd/grub_timeout*:: +This Option to set the GRUB menu timeout in seconds (i.e.'5'). +If unset, it defaults to `10` + +*livecd/grub_theme*:: +This option sets the theme path inside the ISO, to a GRUB `theme.txt` used +by the generated ISO bootloader configuration (i.e. +`/boot/grub/themes/mytheme/theme.txt`). If unset, it defaults to +`/boot/grub/themes/gentoo_frosted/theme.txt`. + Kernel and boot issues ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/targets/support/iso-bootloader-setup.sh b/targets/support/iso-bootloader-setup.sh index 70e9afd6..74458215 100755 --- a/targets/support/iso-bootloader-setup.sh +++ b/targets/support/iso-bootloader-setup.sh @@ -111,13 +111,13 @@ case ${clst_hostarch} in mkdir -p $1/boot/grub echo 'set default=0' > ${iacfg} echo 'set gfxpayload=keep' >> ${iacfg} - echo 'set timeout=10' >> ${iacfg} + echo "set timeout=${clst_livecd_grub_timeout:-10}" >> ${iacfg} echo 'insmod all_video' >> ${iacfg} echo 'insmod png' >> ${iacfg} echo 'insmod gfxterm' >> ${iacfg} echo 'terminal_output gfxterm' >> ${iacfg} echo 'set gfxmode=auto' >> ${iacfg} - echo 'set theme=/boot/grub/themes/gentoo_frosted/theme.txt' >> ${iacfg} + echo "set theme=${clst_livecd_grub_theme:-/boot/grub/themes/gentoo_frosted/theme.txt}" >> ${iacfg} echo '' >> ${iacfg} for x in ${clst_boot_kernel} do