update installer and docs

This commit is contained in:
Astral
2026-09-01 08:21:01 +02:00
parent 6729f58ed6
commit 6b65014d64
6 changed files with 178 additions and 53 deletions
+62 -1
View File
@@ -46,6 +46,63 @@ pick() { # prompt, array-of-labels, defaults -> writes choice to $CHOICE
fi
}
# ---- network check -------------------------------------------------------
# The ISO carries only the installer. Everything else (kernels, init systems,
# libcs, filesystems, tools) is fetched and built at install time, so a working
# network connection is a hard prerequisite.
require_network() {
local ok=0
# try a few reachability probes
for host in mirror.keru.org github.com 1.1.1.1; do
if command -v ping >/dev/null 2>&1 && ping -c1 -W2 "$host" >/dev/null 2>&1; then ok=1; break; fi
# fallback: plain connect test via /dev/tcp
case "$host" in
*.*.*.*) : ;; # ip already covered by ping
esac
done
if [ "$ok" = "0" ]; then
if command -v nc >/dev/null 2>&1; then
nc -z -w5 mirror.keru.org 443 >/dev/null 2>&1 && ok=1
fi
fi
[ "$ok" = "1" ]
}
# ---- network configuration ------------------------------------------------
configure_network() {
msg "network configuration"
if command -v nmtui >/dev/null 2>&1; then
nmtui 2>/dev/null && return 0
fi
if command -v dialog >/dev/null 2>&1 && command -v wifi-menu >/dev/null 2>&1; then
dialog --stdout --menu "Network" 12 40 3 \
1 "Wireless (wifi-menu)" 2 "Ethernet (skip)" 3 "Manual (ip)" 2>/dev/null
fi
read -r -p "Bring up Ethernet (DHCP) now? [Y/n] " eth
case "$eth" in
n|N|no) : ;;
*) command -v dhcpcd >/dev/null 2>&1 && (dhcpcd >/dev/null 2>&1 &) || true ;;
esac
}
banner "Keru OS — network required"
info "the ISO only carries the installer."
info "the system you choose (init, libc, fs, kernel, tools) is fetched and"
info "built from the network during installation. a connection is required."
if require_network; then
msg "network: connected"
else
warn "network: not detected"
read -r -p "Configure the network now? [Y/n] " cfg
case "$cfg" in
n|N|no) die "a network connection is required to install Keru" ;;
*) configure_network ;;
esac
require_network || die "still no network connection — cannot install"
msg "network: connected"
fi
# ---- swappable selections ------------------------------------------------
banner "Keru OS — craft your system"
@@ -61,7 +118,10 @@ TARGET_FS="$CHOICE"
pick "Kernel" linux linux linux-lts linux-hardened linux-cachyos linux-zen
KERNEL="$CHOICE"
pick "Network tools" nmtui networkmanager nmtui connman
pick "Privilege elevation (sudo alternative)" doas doas sudo opendoas su
SUDO="$CHOICE"
pick "Network tools" nmtui nmtui networkmanager connman systemd-networkd
NET="$CHOICE"
# ---- assemble make.conf ------------------------------------------------
@@ -72,6 +132,7 @@ INIT=$INIT
LIBC=$LIBC
TARGET_FS=$TARGET_FS
KERNEL=$KERNEL
SUDO=$SUDO
NET=$NET
LICENSE_ACCEPT=(*)
EOF