fix: installer auto-start via profile.d, revert to embedded EFI, dark ISOLINUX

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) <noreply@anthropic.com>
This commit is contained in:
Dorian 2026-03-28 00:35:34 +00:00
parent 34a476d0a1
commit 56be32e55b

View File

@ -505,33 +505,18 @@ ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM ExecStart=-/sbin/agetty --autologin root --noclear %I \$TERM
GETTY GETTY
# Create the installer auto-start systemd service # Auto-start installer via profile.d (runs after auto-login, no getty race)
cat > /installer/etc/systemd/system/archipelago-installer.service <<SVCFILE # This is the same approach the working Debian Live build used.
[Unit] mkdir -p /installer/etc/profile.d
Description=Archipelago Auto-Installer cat > /installer/etc/profile.d/z99-archipelago-installer.sh <<PROFILE
After=multi-user.target systemd-logind.service
Wants=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/archipelago-start-installer
StandardInput=tty
StandardOutput=tty
StandardError=tty
TTYPath=/dev/tty1
TTYReset=yes
TTYVHangup=yes
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
SVCFILE
chroot /installer systemctl enable archipelago-installer.service
# Create the installer start wrapper
cat > /installer/usr/local/bin/archipelago-start-installer <<WRAPPER
#!/bin/bash #!/bin/bash
sleep 2 # Auto-start Archipelago installer on login — only run once
if [ -n "\$INSTALLER_STARTED" ]; then
return 0 2>/dev/null || exit 0
fi
export INSTALLER_STARTED=1
sleep 1
clear clear
echo "" echo ""
echo " ARCHIPELAGO BITCOIN NODE OS" echo " ARCHIPELAGO BITCOIN NODE OS"
@ -551,16 +536,17 @@ if [ -n "\$BOOT_MEDIA" ]; then
echo "" echo ""
echo " Press Enter to start installation, or Ctrl+C for shell..." echo " Press Enter to start installation, or Ctrl+C for shell..."
read read
exec bash "\$BOOT_MEDIA/archipelago/auto-install.sh" sudo bash "\$BOOT_MEDIA/archipelago/auto-install.sh"
else else
echo " Installer not found on boot media." echo " Installer not found on boot media."
echo " Checked: /run/live/medium, /run/archiso, /cdrom, /media/cdrom" echo " Checked: /run/live/medium, /run/archiso, /cdrom, /media/cdrom"
echo "" echo ""
echo " Dropping to shell for manual recovery..." echo " You can try manually:"
exec /bin/bash echo " sudo bash /path/to/archipelago/auto-install.sh"
echo ""
fi fi
WRAPPER PROFILE
chmod +x /installer/usr/local/bin/archipelago-start-installer chmod +x /installer/etc/profile.d/z99-archipelago-installer.sh
# Custom initramfs hook: mount ISO boot media at /run/archiso # Custom initramfs hook: mount ISO boot media at /run/archiso
mkdir -p /installer/etc/initramfs-tools/hooks 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/initrd.img" "$INSTALLER_ISO/live/initrd.img"
cp "$WORK_DIR/filesystem.squashfs" "$INSTALLER_ISO/live/filesystem.squashfs" cp "$WORK_DIR/filesystem.squashfs" "$INSTALLER_ISO/live/filesystem.squashfs"
cp "$WORK_DIR/BOOTX64.EFI" "$INSTALLER_ISO/EFI/BOOT/BOOTX64.EFI" 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/isolinux.bin" "$INSTALLER_ISO/isolinux/isolinux.bin"
cp "$WORK_DIR/ldlinux.c32" "$INSTALLER_ISO/isolinux/ldlinux.c32" 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/menu.c32" "$INSTALLER_ISO/isolinux/menu.c32" 2>/dev/null || true
@ -2572,11 +2558,17 @@ UI menu.c32
PROMPT 0 PROMPT 0
TIMEOUT 50 TIMEOUT 50
MENU TITLE ARCHIPELAGO INSTALLER MENU TITLE ARCHIPELAGO - Bitcoin Node OS
MENU COLOR border 30;44 #40ffffff #00000000 std MENU COLOR screen 37;40 #80ffffff #00000000 std
MENU COLOR title 1;36;44 #ff00b7ff #00000000 std MENU COLOR border 30;40 #00000000 #00000000 none
MENU COLOR sel 7;37;40 #ffffffff #ff333333 std MENU COLOR title 1;37;40 #fffb923c #00000000 std
MENU COLOR unsel 37;44 #ffaaaaaa #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 DEFAULT install
@ -2631,44 +2623,36 @@ if [ ! -f "$ISOHDPFX" ]; then
done done
fi fi
# EFI boot image was built in Step 2 and placed at staging/efiboot.img # EFI boot image — embedded inside ISO (same approach as the working main ISO)
# The Will Haley / Debian live-build approach: append EFI as GPT partition 2 # The efi.img must be copied into the ISO directory in Step 2 artifact placement
# This is what makes USB boot work on real UEFI hardware (not just QEMU) EFI_IMG="$INSTALLER_ISO/boot/grub/efi.img"
EFIBOOT="$WORK_DIR/efi.img"
if [ ! -f "$EFIBOOT" ]; then if [ ! -f "$EFI_IMG" ]; then
echo " WARNING: No EFI boot image — ISO will only support Legacy BIOS boot" echo " WARNING: No EFI boot image — ISO will only support Legacy BIOS boot"
xorriso -as mkisofs -o "$OUTPUT_ISO" \ xorriso -as mkisofs -o "$OUTPUT_ISO" \
-volid "ARCHIPELAGO" \ -volid "ARCHIPELAGO" \
-iso-level 3 \ -iso-level 3 \
-full-iso9660-filenames \ -J -joliet-long -R \
--mbr-force-bootable -partition_offset 16 \
-joliet -joliet-long -rational-rock \
-isohybrid-mbr "$ISOHDPFX" \ -isohybrid-mbr "$ISOHDPFX" \
-eltorito-boot isolinux/isolinux.bin \ -c isolinux/boot.cat \
-no-emul-boot \ -b isolinux/isolinux.bin \
-boot-load-size 4 \ -no-emul-boot -boot-load-size 4 -boot-info-table \
-boot-info-table \ -partition_offset 16 \
--eltorito-catalog isolinux/isolinux.cat \
"$INSTALLER_ISO" "$INSTALLER_ISO"
else else
xorriso -as mkisofs -o "$OUTPUT_ISO" \ xorriso -as mkisofs -o "$OUTPUT_ISO" \
-volid "ARCHIPELAGO" \ -volid "ARCHIPELAGO" \
-iso-level 3 \ -iso-level 3 \
-full-iso9660-filenames \ -J -joliet-long -R \
--mbr-force-bootable -partition_offset 16 \
-joliet -joliet-long -rational-rock \
-isohybrid-mbr "$ISOHDPFX" \ -isohybrid-mbr "$ISOHDPFX" \
-eltorito-boot isolinux/isolinux.bin \ -c isolinux/boot.cat \
-no-emul-boot \ -b isolinux/isolinux.bin \
-boot-load-size 4 \ -no-emul-boot -boot-load-size 4 -boot-info-table \
-boot-info-table \
--eltorito-catalog isolinux/isolinux.cat \
-eltorito-alt-boot \ -eltorito-alt-boot \
-e --interval:appended_partition_2:all:: \ -e boot/grub/efi.img \
-no-emul-boot \ -no-emul-boot \
-isohybrid-gpt-basdat \ -isohybrid-gpt-basdat \
-append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B "$EFIBOOT" \ -partition_offset 16 \
"$INSTALLER_ISO" "$INSTALLER_ISO"
fi fi