mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
Debian ISO: hostname defaults to wrolpi, boot menu times out (#836)
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
* Debian ISO: hostname defaults to wrolpi, boot menu times out
The installer's hostname question defaulted to "debian", so an install that
kept the default was not reachable at wrolpi.local. A preseed in the
installer initrd now defaults it to wrolpi; the question is still shown (and
a DHCP-provided hostname still wins).
The ISO's GRUB and ISOLINUX menus had no timeout, so a Live USB waited at the
boot menu forever after any reboot or power loss. The menus now boot the
default entry ("Run WROLPi (live)") after 10 seconds.
check-iso.sh fails the build if either regresses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Debian ISO: say what the wrolpi hostname is for
The image does not include avahi-daemon, so the hostname alone does not make
wrolpi.local resolve. The default still names the TLS certificate, the
SMB/NetBIOS share, and the DHCP hostname a router may publish.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
baa86b4ad1
commit
c6613dfee0
3 changed files with 45 additions and 1 deletions
|
|
@ -69,6 +69,27 @@ if awk -F: '$3 >= 1000 && $3 < 60000 {found=1} END {exit !found}' "${TMP}/passwd
|
|||
FAILED=1
|
||||
fi
|
||||
|
||||
# A Live USB must come back on its own after a reboot or power loss: the boot
|
||||
# menus must boot their default entry after a timeout (0 waits forever).
|
||||
if ! extract boot/grub/config.cfg || ! grep -qE '^set timeout=[1-9]' "${TMP}/config.cfg"; then
|
||||
echo "ERROR: the GRUB (UEFI) boot menu has no timeout; a Live USB would wait at it forever." >&2
|
||||
FAILED=1
|
||||
fi
|
||||
if extract isolinux/isolinux.cfg && ! grep -qE '^timeout [1-9]' "${TMP}/isolinux.cfg"; then
|
||||
echo "ERROR: the ISOLINUX (BIOS) boot menu has no timeout; a Live USB would wait at it forever." >&2
|
||||
FAILED=1
|
||||
fi
|
||||
|
||||
# The installer should default the hostname to wrolpi (wrolpi.local), via the
|
||||
# preseed live-build copies into each installer initrd.
|
||||
for initrd in install/initrd.gz install/gtk/initrd.gz; do
|
||||
if ! bsdtar -xOf "${ISO}" "${initrd}" 2>/dev/null | bsdtar -xOf - preseed.cfg 2>/dev/null \
|
||||
| grep -q '^d-i netcfg/get_hostname string wrolpi$'; then
|
||||
echo "ERROR: ${initrd} does not preseed the hostname wrolpi." >&2
|
||||
FAILED=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${FAILED}" -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Rebrand the live-build generated boot menus.
|
||||
# Rebrand the live-build generated boot menus, and boot the default entry
|
||||
# ("Run WROLPi (live)") after a timeout so a Live USB comes back on its own
|
||||
# after a reboot or power loss.
|
||||
#
|
||||
# live-build invokes binary hooks with cwd = the build's binary/ directory
|
||||
# (it does `cd binary && ../hook`), so paths here are relative to binary/.
|
||||
|
|
@ -45,3 +47,15 @@ for f in isolinux/live.cfg \
|
|||
"$f"
|
||||
fi
|
||||
done
|
||||
|
||||
# Boot the default entry after 10 seconds (live-build sets no timeout, so the
|
||||
# menu waited forever). Any key stops the countdown.
|
||||
BOOT_MENU_TIMEOUT=10
|
||||
# GRUB (UEFI): grub.cfg sources config.cfg, which sets default=0.
|
||||
if [ -f boot/grub/config.cfg ]; then
|
||||
echo "set timeout=${BOOT_MENU_TIMEOUT}" >> boot/grub/config.cfg
|
||||
fi
|
||||
# ISOLINUX (BIOS): timeout is in tenths of a second; 0 waits forever.
|
||||
if [ -f isolinux/isolinux.cfg ]; then
|
||||
sed -i "s|^timeout 0$|timeout $((BOOT_MENU_TIMEOUT * 10))|" isolinux/isolinux.cfg
|
||||
fi
|
||||
|
|
|
|||
9
debian-live-config/config/includes.installer/preseed.cfg
Normal file
9
debian-live-config/config/includes.installer/preseed.cfg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Debian installer defaults. live-build copies this into the installer's
|
||||
# initrd, where d-i loads /preseed.cfg automatically.
|
||||
#
|
||||
# Default the hostname to wrolpi (Debian's default is "debian"), as on the live
|
||||
# session and the Pi: it names the TLS certificate, the SMB/NetBIOS share, and
|
||||
# the DHCP hostname a router may publish. "seen false" keeps the question on
|
||||
# screen, so it can still be changed; a hostname from DHCP takes precedence.
|
||||
d-i netcfg/get_hostname string wrolpi
|
||||
d-i netcfg/get_hostname seen false
|
||||
Loading…
Add table
Add a link
Reference in a new issue