fix(iso): installer always installs the canonical archipelago.service (B17 regression)
The ISO's rootfs tar is a cached build artifact (currently 2026-04-20) and its baked-in archipelago.service predates the B17 fix — no RequiresMountsFor=/var/lib/archipelago — while auto-install.sh only copied the configs/ unit when the rootfs had none. Every fresh install therefore raced the LUKS data mount on cold boot and looped '[FAILED] Failed to start archipelago.service' for minutes (seen on the 1.7.99-alpha ISO). Ship configs/archipelago.service on the ISO at archipelago/configs/ and make the installer overwrite the rootfs copy unconditionally. Also add RequiresMountsFor to the legacy install-to-disk.sh inline unit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
13ee019b85
commit
03418e5d26
@ -1064,6 +1064,14 @@ echo " netavark + aardvark-dns: included in rootfs (Debian 13 packages)"
|
||||
echo " Including root filesystem..."
|
||||
cp "$ROOTFS_TAR" "$ARCH_DIR/rootfs.tar"
|
||||
|
||||
# Ship the canonical systemd unit on the ISO. The rootfs tar is a cached
|
||||
# artifact that can predate unit fixes (B17: RequiresMountsFor on the data
|
||||
# volume — without it fresh installs boot-loop "[FAILED]" until the LUKS
|
||||
# mount lands), so the installer overwrites the rootfs copy with this one.
|
||||
mkdir -p "$ARCH_DIR/configs"
|
||||
cp "$SCRIPT_DIR/../configs/archipelago.service" "$ARCH_DIR/configs/archipelago.service"
|
||||
echo " Using archipelago.service from configs/ (installer overrides rootfs copy)"
|
||||
|
||||
# Capture backend binary from live server
|
||||
if [ "$BUILD_FROM_SOURCE" = "1" ]; then
|
||||
echo " Building backend binary from source..."
|
||||
@ -2662,11 +2670,16 @@ alias poweroff='sudo systemctl poweroff'
|
||||
ALIASES
|
||||
fi
|
||||
|
||||
# Systemd service: use the production version from rootfs (configs/archipelago.service)
|
||||
# Do NOT overwrite — the rootfs already has the correct User=archipelago, no DEV_MODE version
|
||||
if [ ! -f /mnt/target/etc/systemd/system/archipelago.service ]; then
|
||||
echo " WARNING: archipelago.service missing from rootfs — copying from ISO"
|
||||
cp "$BOOT_MEDIA/archipelago/../configs/archipelago.service" /mnt/target/etc/systemd/system/archipelago.service 2>/dev/null || true
|
||||
# Systemd service: the canonical unit shipped on the ISO (archipelago/configs/)
|
||||
# ALWAYS wins over the rootfs copy — the rootfs tar is a cached build artifact
|
||||
# that can predate unit fixes (B17: without RequiresMountsFor=/var/lib/archipelago
|
||||
# the service races the LUKS data mount on cold boot and "[FAILED]"-loops for
|
||||
# minutes on every fresh install).
|
||||
if [ -f "$BOOT_MEDIA/archipelago/configs/archipelago.service" ]; then
|
||||
cp "$BOOT_MEDIA/archipelago/configs/archipelago.service" /mnt/target/etc/systemd/system/archipelago.service
|
||||
echo " Installed archipelago.service from ISO configs (overrides rootfs copy)"
|
||||
elif [ ! -f /mnt/target/etc/systemd/system/archipelago.service ]; then
|
||||
echo " WARNING: archipelago.service missing from rootfs and ISO configs"
|
||||
fi
|
||||
|
||||
# Claude API proxy — middleware that injects max_tokens, strips invalid fields
|
||||
|
||||
@ -325,6 +325,9 @@ PROFILE_EOF
|
||||
Description=Archipelago Backend Server
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
# Never start before the data volume (if one exists) is mounted — without this
|
||||
# the service races the mount on cold boot and "[FAILED]"-loops until it lands (B17)
|
||||
RequiresMountsFor=/var/lib/archipelago
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user