From 69c04f4c013967c6a586c7dde207de958acc2e2f Mon Sep 17 00:00:00 2001 From: Dorian Date: Sat, 28 Mar 2026 00:35:34 +0000 Subject: [PATCH] fix: installer auto-start via profile.d, revert to embedded EFI, dark ISOLINUX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three fixes from real hardware testing: 1. Installer auto-start: replace systemd service with profile.d script. The service and getty raced on tty1 — service output was overwritten by the login prompt. Profile.d runs AFTER auto-login, same approach the working Debian Live build used. 2. xorriso: revert from -append_partition to embedded -e boot/grub/efi.img. The appended partition approach produces cyl-align-off with zero CHS geometry, which is why BIOS wouldn't recognize the USB. The embedded approach matches the working main ISO (cyl-align-on, proper CHS). 3. ISOLINUX: dark theme instead of ugly blue. Black background, orange title, dark selection highlight. No blue boxes. Co-Authored-By: Claude Opus 4.6 (1M context) --- image-recipe/build-auto-installer-iso.sh | 108 ++++++++++------------- 1 file changed, 46 insertions(+), 62 deletions(-) diff --git a/image-recipe/build-auto-installer-iso.sh b/image-recipe/build-auto-installer-iso.sh index 21133a97..8caa9b4f 100755 --- a/image-recipe/build-auto-installer-iso.sh +++ b/image-recipe/build-auto-installer-iso.sh @@ -505,33 +505,18 @@ ExecStart= ExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM GETTY -# Create the installer auto-start systemd service -cat > /installer/etc/systemd/system/archipelago-installer.service < /installer/usr/local/bin/archipelago-start-installer < /installer/etc/profile.d/z99-archipelago-installer.sh </dev/null || exit 0 +fi +export INSTALLER_STARTED=1 + +sleep 1 clear echo "" echo " ARCHIPELAGO BITCOIN NODE OS" @@ -551,16 +536,17 @@ if [ -n "\$BOOT_MEDIA" ]; then echo "" echo " Press Enter to start installation, or Ctrl+C for shell..." read - exec bash "\$BOOT_MEDIA/archipelago/auto-install.sh" + sudo bash "\$BOOT_MEDIA/archipelago/auto-install.sh" else echo " Installer not found on boot media." echo " Checked: /run/live/medium, /run/archiso, /cdrom, /media/cdrom" echo "" - echo " Dropping to shell for manual recovery..." - exec /bin/bash + echo " You can try manually:" + echo " sudo bash /path/to/archipelago/auto-install.sh" + echo "" fi -WRAPPER -chmod +x /installer/usr/local/bin/archipelago-start-installer +PROFILE +chmod +x /installer/etc/profile.d/z99-archipelago-installer.sh # Custom initramfs hook: mount ISO boot media at /run/archiso mkdir -p /installer/etc/initramfs-tools/hooks @@ -692,7 +678,7 @@ cp "$WORK_DIR/vmlinuz" "$INSTALLER_ISO/live/vmlinuz" cp "$WORK_DIR/initrd.img" "$INSTALLER_ISO/live/initrd.img" cp "$WORK_DIR/filesystem.squashfs" "$INSTALLER_ISO/live/filesystem.squashfs" cp "$WORK_DIR/BOOTX64.EFI" "$INSTALLER_ISO/EFI/BOOT/BOOTX64.EFI" -# Note: efi.img stays in $WORK_DIR — it gets appended as GPT partition 2 by xorriso +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 @@ -2572,11 +2558,17 @@ UI menu.c32 PROMPT 0 TIMEOUT 50 -MENU TITLE ARCHIPELAGO INSTALLER -MENU COLOR border 30;44 #40ffffff #00000000 std -MENU COLOR title 1;36;44 #ff00b7ff #00000000 std -MENU COLOR sel 7;37;40 #ffffffff #ff333333 std -MENU COLOR unsel 37;44 #ffaaaaaa #00000000 std +MENU TITLE ARCHIPELAGO - Bitcoin Node OS +MENU COLOR screen 37;40 #80ffffff #00000000 std +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 DEFAULT install @@ -2631,44 +2623,36 @@ if [ ! -f "$ISOHDPFX" ]; then done fi -# EFI boot image was built in Step 2 and placed at staging/efiboot.img -# The Will Haley / Debian live-build approach: append EFI as GPT partition 2 -# This is what makes USB boot work on real UEFI hardware (not just QEMU) -EFIBOOT="$WORK_DIR/efi.img" +# EFI boot image — embedded inside ISO (same approach as the working main ISO) +# The efi.img must be copied into the ISO directory in Step 2 artifact placement +EFI_IMG="$INSTALLER_ISO/boot/grub/efi.img" -if [ ! -f "$EFIBOOT" ]; then +if [ ! -f "$EFI_IMG" ]; then echo " WARNING: No EFI boot image — ISO will only support Legacy BIOS boot" xorriso -as mkisofs -o "$OUTPUT_ISO" \ -volid "ARCHIPELAGO" \ -iso-level 3 \ - -full-iso9660-filenames \ - --mbr-force-bootable -partition_offset 16 \ - -joliet -joliet-long -rational-rock \ + -J -joliet-long -R \ -isohybrid-mbr "$ISOHDPFX" \ - -eltorito-boot isolinux/isolinux.bin \ - -no-emul-boot \ - -boot-load-size 4 \ - -boot-info-table \ - --eltorito-catalog isolinux/isolinux.cat \ + -c isolinux/boot.cat \ + -b isolinux/isolinux.bin \ + -no-emul-boot -boot-load-size 4 -boot-info-table \ + -partition_offset 16 \ "$INSTALLER_ISO" else xorriso -as mkisofs -o "$OUTPUT_ISO" \ -volid "ARCHIPELAGO" \ -iso-level 3 \ - -full-iso9660-filenames \ - --mbr-force-bootable -partition_offset 16 \ - -joliet -joliet-long -rational-rock \ + -J -joliet-long -R \ -isohybrid-mbr "$ISOHDPFX" \ - -eltorito-boot isolinux/isolinux.bin \ - -no-emul-boot \ - -boot-load-size 4 \ - -boot-info-table \ - --eltorito-catalog isolinux/isolinux.cat \ + -c isolinux/boot.cat \ + -b isolinux/isolinux.bin \ + -no-emul-boot -boot-load-size 4 -boot-info-table \ -eltorito-alt-boot \ - -e --interval:appended_partition_2:all:: \ - -no-emul-boot \ - -isohybrid-gpt-basdat \ - -append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B "$EFIBOOT" \ + -e boot/grub/efi.img \ + -no-emul-boot \ + -isohybrid-gpt-basdat \ + -partition_offset 16 \ "$INSTALLER_ISO" fi