From 6311aa563ea48aad6e8df4407e711f571f2322da Mon Sep 17 00:00:00 2001 From: Dorian Date: Sat, 28 Mar 2026 03:15:47 +0000 Subject: [PATCH] feat: UEFI boot fix, graphical ISOLINUX menu, instant boot UEFI (#5): grub-mkstandalone embedded config now insmod's all needed modules (iso9660, search_label, normal, linux) and uses 'normal' to load the full grub.cfg. Previous config couldn't find the ISO root. ISOLINUX (#6, #7): Switch from menu.c32 to vesamenu.c32 for background image support. Copies splash.png from branding. TIMEOUT 0 for instant boot (no keyboard lag, no menu flicker). Dark theme with transparent background over the splash image. Also: added vesamenu.c32 and libcom32.c32 to build artifacts. Removed console=ttyS0 from quiet boot (interferes with Plymouth). Added splash to quiet boot kernel params. Co-Authored-By: Claude Opus 4.6 (1M context) --- image-recipe/build-auto-installer-iso.sh | 64 +++++++++++++++++------- 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/image-recipe/build-auto-installer-iso.sh b/image-recipe/build-auto-installer-iso.sh index 13443460..03ee3335 100755 --- a/image-recipe/build-auto-installer-iso.sh +++ b/image-recipe/build-auto-installer-iso.sh @@ -627,16 +627,22 @@ echo " [container] Creating installer squashfs..." mksquashfs /installer /output/filesystem.squashfs -comp xz -Xbcj x86 -noappend -quiet # Build GRUB EFI image with embedded bootstrap config (grub-mkstandalone) -# This ensures GRUB can find its config on real hardware, not just QEMU echo " [container] Building GRUB EFI image..." -cat > /tmp/grub-embed.cfg < /tmp/grub-embed.cfg <<'GRUBEMBED' +insmod part_gpt +insmod fat +insmod iso9660 +insmod search_label +insmod normal +insmod linux +insmod all_video search --no-floppy --set=root --label ARCHIPELAGO -set prefix=(\\\$root)/boot/grub -configfile \\\$prefix/grub.cfg +set prefix=($root)/boot/grub +normal GRUBEMBED grub-mkstandalone -O x86_64-efi \ - --modules="part_gpt part_msdos fat iso9660 all_video font gfxterm" \ + --modules="part_gpt part_msdos fat iso9660 search search_label normal linux all_video font gfxterm configfile echo cat ls test true loopback png" \ --locales="" \ --themes="" \ --fonts="" \ @@ -653,7 +659,9 @@ mcopy -i /output/efi.img /output/BOOTX64.EFI ::/EFI/BOOT/BOOTX64.EFI cp /usr/lib/ISOLINUX/isolinux.bin /output/isolinux.bin cp /usr/lib/syslinux/modules/bios/ldlinux.c32 /output/ldlinux.c32 cp /usr/lib/syslinux/modules/bios/menu.c32 /output/menu.c32 2>/dev/null || true +cp /usr/lib/syslinux/modules/bios/vesamenu.c32 /output/vesamenu.c32 2>/dev/null || true cp /usr/lib/syslinux/modules/bios/libutil.c32 /output/libutil.c32 2>/dev/null || true +cp /usr/lib/syslinux/modules/bios/libcom32.c32 /output/libcom32.c32 2>/dev/null || true cp /usr/lib/ISOLINUX/isohdpfx.bin /output/isohdpfx.bin # Generate GRUB fonts for theme @@ -685,7 +693,9 @@ cp "$WORK_DIR/efi.img" "$INSTALLER_ISO/boot/grub/efi.img" cp "$WORK_DIR/isolinux.bin" "$INSTALLER_ISO/isolinux/isolinux.bin" cp "$WORK_DIR/ldlinux.c32" "$INSTALLER_ISO/isolinux/ldlinux.c32" cp "$WORK_DIR/menu.c32" "$INSTALLER_ISO/isolinux/menu.c32" 2>/dev/null || true +cp "$WORK_DIR/vesamenu.c32" "$INSTALLER_ISO/isolinux/vesamenu.c32" 2>/dev/null || true cp "$WORK_DIR/libutil.c32" "$INSTALLER_ISO/isolinux/libutil.c32" 2>/dev/null || true +cp "$WORK_DIR/libcom32.c32" "$INSTALLER_ISO/isolinux/libcom32.c32" 2>/dev/null || true # Install GRUB theme THEME_SRC="$SCRIPT_DIR/branding/grub-theme" @@ -2539,7 +2549,7 @@ else fi menuentry "Install Archipelago" --hotkey=i { - linux ($root)/live/vmlinuz boot=live components quiet console=ttyS0,115200 console=tty0 + linux ($root)/live/vmlinuz boot=live components quiet splash initrd ($root)/live/initrd.img } @@ -2564,29 +2574,47 @@ fi # Create ISOLINUX configuration (legacy BIOS boot) echo " Writing ISOLINUX config..." +# Copy background image for ISOLINUX graphical menu +ISOLINUX_BG="$SCRIPT_DIR/branding/grub-theme/background.png" +if [ -f "$ISOLINUX_BG" ]; then + cp "$ISOLINUX_BG" "$INSTALLER_ISO/isolinux/splash.png" +fi + +# Copy vesamenu.c32 for graphical menu (with background support) +if [ -f "$WORK_DIR/vesamenu.c32" ]; then + cp "$WORK_DIR/vesamenu.c32" "$INSTALLER_ISO/isolinux/vesamenu.c32" +fi + cat > "$INSTALLER_ISO/isolinux/isolinux.cfg" <<'ISOCFG' -UI menu.c32 +UI vesamenu.c32 PROMPT 0 -TIMEOUT 10 +TIMEOUT 0 MENU TITLE ARCHIPELAGO - Bitcoin Node OS -MENU COLOR screen 37;40 #80ffffff #00000000 std +MENU BACKGROUND splash.png +MENU RESOLUTION 1024 768 +MENU VSHIFT 14 +MENU HSHIFT 6 +MENU WIDTH 40 +MENU COLOR screen 37;40 #00000000 #00000000 none MENU COLOR border 30;40 #00000000 #00000000 none -MENU COLOR title 1;37;40 #fffb923c #00000000 std -MENU COLOR sel 7;37;40 #ffffffff #ff1a1a1a std -MENU COLOR unsel 37;40 #ff999999 #00000000 std -MENU COLOR hotkey 1;37;40 #fffb923c #00000000 std -MENU COLOR hotsel 1;37;40 #fffb923c #ff1a1a1a std -MENU COLOR timeout_msg 37;40 #ff666666 #00000000 std -MENU COLOR timeout 1;37;40 #fffb923c #00000000 std -MENU COLOR tabmsg 37;40 #ff666666 #00000000 std +MENU COLOR title 1;37;40 #fffb923c #00000000 none +MENU COLOR sel 7;37;40 #ffffffff #80333333 std +MENU COLOR unsel 37;40 #ff999999 #00000000 none +MENU COLOR hotkey 1;37;40 #fffb923c #00000000 none +MENU COLOR hotsel 1;37;40 #fffb923c #80333333 std +MENU COLOR timeout_msg 37;40 #ff666666 #00000000 none +MENU COLOR timeout 1;37;40 #fffb923c #00000000 none +MENU COLOR tabmsg 37;40 #ff666666 #00000000 none +MENU COLOR cmdmark 37;40 #00000000 #00000000 none +MENU COLOR cmdline 37;40 #00000000 #00000000 none DEFAULT install LABEL install MENU LABEL Install Archipelago KERNEL /live/vmlinuz - APPEND initrd=/live/initrd.img boot=live components quiet console=ttyS0,115200 console=tty0 + APPEND initrd=/live/initrd.img boot=live components quiet MENU DEFAULT LABEL install-verbose