-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
The archup-first-boot.service fails silently on first boot because DNS is not yet available when the service starts, despite the service declaring After=network-online.target.
Observed behavior
All network-dependent steps fail with Could not resolve host: ...:
archup-cliinstall:dial tcp: lookup proxy.golang.org ... connection refusedble.shinstall:Could not resolve host: github.compacman -Syuincli-tools.sh: every mirror returnsCould not resolve host: ...
The journal only shows [KO] CLI tools installation failed (non-critical), hiding the real cause.
Root cause
network-online.target signals that a network interface has an IP address, but does not guarantee that DNS is operational. The DNS resolver (systemd-resolved or otherwise) may not be fully ready by the time the service runs, especially on first boot.
Steps to reproduce
Fresh install → first boot → check /var/log/archup-first-boot.log → all curl/pacman/go calls fail with DNS resolution errors.
Proposed fixes
Option 1 — Add systemd-resolved as a dependency in the service unit:
After=local-fs.target systemd-logind.service dbus.service network-online.target systemd-resolved.service
Wants=network-online.target systemd-resolved.serviceOption 2 — Add a DNS readiness wait loop at the top of all.sh before any network calls:
echo "Waiting for DNS..." | tee -a "$LOG_FILE"
until nslookup archlinux.org &>/dev/null; do sleep 2; done
echo "DNS is ready." | tee -a "$LOG_FILE"Option 3 — Combine both for maximum robustness.
Workaround
Remove the sentinel file and re-run the service once the system is fully up:
sudo rm /var/lib/archup-first-boot-complete
sudo systemctl start archup-first-boot.serviceEnvironment
- Service:
/etc/systemd/system/archup-first-boot.service - Scripts:
/usr/local/share/archup/post-boot/ - Log:
/var/log/archup-first-boot.log