Target changed from N100 to a Wyse 3040 (2G RAM / 8G eMMC): default disk is now autodetected (nvme, else mmcblk0, else first non-USB disk) and the live environment carries the homelab SSH keys, so the install runs over SSH without a monitor (firmware boot-order/Secure-Boot still needs one console visit if not already set). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
28 lines
1.2 KiB
Bash
Executable File
28 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Runs INSIDE the archlinux container (invoked by build.sh).
|
|
# Assembles the profile from the container's releng + the repo overlay,
|
|
# then builds the ISO to /out.
|
|
set -euo pipefail
|
|
|
|
pacman -Syu --noconfirm archiso
|
|
|
|
profile=/tmp/profile
|
|
cp -r /usr/share/archiso/configs/releng/. "$profile"
|
|
cp -r /src/airootfs/. "$profile/airootfs/"
|
|
|
|
# Tools the installer script needs in the live environment (idempotent —
|
|
# skip entries releng already ships).
|
|
for pkg in gptfdisk dosfstools e2fsprogs; do
|
|
grep -qx "$pkg" "$profile/packages.x86_64" || echo "$pkg" >> "$profile/packages.x86_64"
|
|
done
|
|
|
|
# Brand the image and make the installer executable inside the ISO.
|
|
sed -i 's/^iso_name=.*/iso_name="edge-host"/' "$profile/profiledef.sh"
|
|
sed -i '/^file_permissions=(/a\ ["/usr/local/bin/edge-install"]="0:0:755"' "$profile/profiledef.sh"
|
|
# Headless install path: releng enables sshd; with the homelab keys on the
|
|
# live root you can `ssh root@<dhcp-ip>` and run edge-install monitor-free.
|
|
sed -i '/^file_permissions=(/a\ ["/root/.ssh"]="0:0:700"' "$profile/profiledef.sh"
|
|
sed -i '/^file_permissions=(/a\ ["/root/.ssh/authorized_keys"]="0:0:600"' "$profile/profiledef.sh"
|
|
|
|
mkarchiso -v -w /tmp/work -o /out "$profile"
|