test: add manual kexec/kickstart-on-cdrom test scripts for ADR-0009
Not part of the backend lifecycle (40_backend.sh) -- run by hand during the live/netinstall boot flow investigation documented in ADR-0009. kexec-reboot-test.sh/.cfg: tests whether inst.ks= can trigger Anaconda via kexec from within the running Fedora Cinnamon live session, without a real firmware reboot. Conclusively fails: the live initrd has no anaconda dracut module at all. wlan-netinst-test.cfg: the kickstart used to validate inst.ks=cdrom:/ks.cfg on a real Fedora netinstall ISO, including the failed WLAN activation attempts (network --wpakey=, then %pre nmcli) that exposed the missing iwlwifi driver in that image's initrd. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
50e41e2230
commit
223bbd7c24
42
backends/fedora/kexec-reboot-test.cfg
Normal file
42
backends/fedora/kexec-reboot-test.cfg
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#version=DEVEL
|
||||||
|
# Test-Kickstart fuer ADR-0009, Pruefplan-Schritt 2 (kexec statt Neustart aus
|
||||||
|
# der Live-Sitzung). Kein Platzhalter-Templating wie kickstart.tpl -- feste
|
||||||
|
# Testwerte, damit sich das Ergebnis eindeutig einer Ursache zuordnen laesst.
|
||||||
|
#
|
||||||
|
# Versuch 2: keine liveimg-Zeile mehr. Versuch 1 (root=live:CDLABEL=...
|
||||||
|
# rd.live.image) landete trotz inst.ks= wieder im normalen Live-Desktop --
|
||||||
|
# vermutlich weil root=live/rd.live.image Dracuts dmsquash-live-Pfad
|
||||||
|
# ausloesen, der inst.ks= ignoriert. Jetzt setzt inst.stage2=hd:LABEL=
|
||||||
|
# TUXFLOTTE:/ (siehe kexec-reboot-test.sh) die Installationsquelle bereits
|
||||||
|
# auf Boot-Ebene -- eine zusaetzliche liveimg-Zeile hier waere eine zweite,
|
||||||
|
# moeglicherweise widerspruechliche Quellenangabe. Der %packages-Abschnitt
|
||||||
|
# wird von Anaconda bei einer liveimg-artigen Quelle ignoriert
|
||||||
|
# (dokumentiertes pykickstart-Verhalten) -- absichtlich leer gelassen.
|
||||||
|
|
||||||
|
text
|
||||||
|
reboot
|
||||||
|
|
||||||
|
lang de_DE.UTF-8
|
||||||
|
keyboard de
|
||||||
|
timezone Europe/Berlin --utc
|
||||||
|
|
||||||
|
rootpw --plaintext test123
|
||||||
|
user --name=tuxflotte --groups=wheel --password=test123
|
||||||
|
|
||||||
|
network --bootproto=dhcp --activate --hostname=fedora-kexec-test
|
||||||
|
|
||||||
|
zerombr
|
||||||
|
clearpart --all --initlabel
|
||||||
|
autopart
|
||||||
|
|
||||||
|
firewall --enabled
|
||||||
|
selinux --enforcing
|
||||||
|
|
||||||
|
bootloader --location=mbr
|
||||||
|
|
||||||
|
%post
|
||||||
|
cat > /etc/motd <<'EOF'
|
||||||
|
kexec-reboot-test (ADR-0009, Schritt 2) -- provisioned by tuxflotte
|
||||||
|
EOF
|
||||||
|
echo "tuxflotte: kexec-reboot-test %post lief durch." >> /var/log/tuxflotte-postinstall.log
|
||||||
|
%end
|
||||||
68
backends/fedora/kexec-reboot-test.sh
Executable file
68
backends/fedora/kexec-reboot-test.sh
Executable file
@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
# Manueller Test fuer ADR-0009, Pruefplan-Schritt 2: prueft, ob Anaconda
|
||||||
|
# rootpw/user/Partitionierung korrekt uebernimmt, wenn der Installer per
|
||||||
|
# kexec (statt liveinst mitten in der Session) mit inst.ks= gestartet wird.
|
||||||
|
#
|
||||||
|
# Kein Teil des Backend-Lifecycles (40_backend.sh) -- wird von Hand in der
|
||||||
|
# laufenden Live-Sitzung ausgefuehrt, Ergebnis wird manuell in Proxmox
|
||||||
|
# beobachtet (siehe Verifikations-Arbeitsteilung: Claude bereitet vor,
|
||||||
|
# Nutzer prueft funktional).
|
||||||
|
#
|
||||||
|
# Versuch 3: Kickstart-Zustellung per HTTPS (inst.ks=https://...) statt per
|
||||||
|
# Initrd-Einbettung. Versuch 2 (Initrd-Anhaengen per cat) scheiterte an
|
||||||
|
# "invalid magic at start of compressed archive" -- vermutlich xz/zstd-
|
||||||
|
# komprimiertes Basis-Initrd, das sich nicht wie ein Gzip-Initrd per cat
|
||||||
|
# verketten laesst. Diese VM haengt an virtio/DHCP, kein WLAN im Spiel,
|
||||||
|
# daher ist Netz-Zustellung hier kein Risiko -- die ungeklaerte WLAN-im-
|
||||||
|
# Dracut-Frage bleibt fuer den spaeteren WLAN-Autoprovisionierungs-Schritt
|
||||||
|
# offen, wird hier bewusst nicht mitgetestet.
|
||||||
|
#
|
||||||
|
# Kickstart-Quelle fuer diesen Test: https://anode.tuxflotte.de/installers/
|
||||||
|
# fedora-workstation/ks.cfg (bestehender Endpoint, temporaer mit
|
||||||
|
# kexec-reboot-test.cfg ueberschrieben, Original als
|
||||||
|
# ks.cfg.bak-2026-07-29 gesichert).
|
||||||
|
|
||||||
|
log() { printf '[kexec-test] %s\n' "$*" >&2; }
|
||||||
|
fatal() { printf '[kexec-test] FEHLER: %s\n' "$*" >&2; exit 1; }
|
||||||
|
|
||||||
|
[[ "${EUID}" -eq 0 ]] || fatal "Bitte als root ausfuehren (sudo)."
|
||||||
|
|
||||||
|
KICKSTART_URL="https://anode.tuxflotte.de/installers/fedora-workstation/ks.cfg"
|
||||||
|
|
||||||
|
log "Pruefe kexec-tools."
|
||||||
|
if ! command -v kexec >/dev/null 2>&1; then
|
||||||
|
log "kexec fehlt, installiere ueber dnf (Netzwerk muss bereits stehen)."
|
||||||
|
dnf install -y kexec-tools || fatal "kexec-tools konnte nicht installiert werden."
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Pruefe Erreichbarkeit der Kickstart-URL: ${KICKSTART_URL}"
|
||||||
|
curl -fsS -o /dev/null "${KICKSTART_URL}" ||
|
||||||
|
fatal "Kickstart-URL nicht erreichbar -- Netzwerk der Live-Sitzung pruefen."
|
||||||
|
|
||||||
|
log "Suche Live-Medium-Kernel/Initrd unter /run/initramfs/live."
|
||||||
|
LIVE_ROOT="/run/initramfs/live"
|
||||||
|
[[ -d "${LIVE_ROOT}" ]] || fatal "Live-Medium nicht unter ${LIVE_ROOT} gemountet -- Pfad pruefen und Skript anpassen."
|
||||||
|
|
||||||
|
LIVE_VMLINUZ="${LIVE_ROOT}/boot/x86_64/loader/linux"
|
||||||
|
LIVE_INITRD="${LIVE_ROOT}/boot/x86_64/loader/initrd"
|
||||||
|
|
||||||
|
for f in "${LIVE_VMLINUZ}" "${LIVE_INITRD}"; do
|
||||||
|
[[ -r "${f}" ]] || fatal "Erwartete Datei fehlt: ${f} -- tatsaechliche Struktur unter ${LIVE_ROOT} pruefen (find ${LIVE_ROOT} -maxdepth 4)."
|
||||||
|
done
|
||||||
|
log "Gefunden: ${LIVE_VMLINUZ}, ${LIVE_INITRD}"
|
||||||
|
|
||||||
|
# Kein root=live/rd.live.image (loest Dracuts dmsquash-live-Pfad aus, der
|
||||||
|
# inst.ks= ignoriert -- real getestet, Versuch 1). inst.stage2= setzt die
|
||||||
|
# Installationsquelle auf Boot-Ebene direkt auf Anacondas eigenen Pfad.
|
||||||
|
# inst.cmdline statt inst.text: bricht laut ab, wenn eine Direktive
|
||||||
|
# unvollstaendig bleibt, statt es wie im ADR-0009-Befund still zu ignorieren.
|
||||||
|
APPEND="inst.stage2=hd:LABEL=TUXFLOTTE:/ vconsole.keymap=de inst.ks=${KICKSTART_URL} inst.cmdline"
|
||||||
|
|
||||||
|
log "kexec -l mit Append: ${APPEND}"
|
||||||
|
kexec -l "${LIVE_VMLINUZ}" --initrd="${LIVE_INITRD}" --append="${APPEND}" ||
|
||||||
|
fatal "kexec -l fehlgeschlagen."
|
||||||
|
|
||||||
|
read -r -p "[kexec-test] Alles geprueft? Enter loest kexec -e aus, Strg+C bricht ab: " _
|
||||||
|
kexec -e
|
||||||
79
backends/fedora/wlan-netinst-test.cfg
Normal file
79
backends/fedora/wlan-netinst-test.cfg
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#version=DEVEL
|
||||||
|
# Test-Kickstart fuer ADR-0009 Ultima Ratio, WLAN-Schritt.
|
||||||
|
#
|
||||||
|
# Liegt direkt auf dem ISO (inst.ks=cdrom:/ks.cfg), wird NICHT per Netz
|
||||||
|
# geladen: das Boot-Initrd von Fedora-Netinstall enthaelt zwar WLAN-Treiber
|
||||||
|
# und NetworkManager, aber kein wpa_supplicant (real geprueft, siehe
|
||||||
|
# ADR-0009-Update) -- WPA waere in dieser fruehen Phase also gar nicht
|
||||||
|
# moeglich, unabhaengig von einem gebackenen Verbindungsprofil.
|
||||||
|
#
|
||||||
|
# wpa_supplicant liegt stattdessen in images/install.img (Anacondas
|
||||||
|
# groesseres Laufzeit-Environment, nach dem Initrd nachgeladen).
|
||||||
|
#
|
||||||
|
# Versuch 1 (mit --activate): real getestet, haengt in
|
||||||
|
# dracut-initqueue.service -- --activate zwingt Anaconda offenbar, das
|
||||||
|
# Geraet bereits in der Dracut-Phase hochzufahren, also genau dort, wo
|
||||||
|
# wpa_supplicant fehlt.
|
||||||
|
#
|
||||||
|
# Versuch 2 (--activate entfernt, sonst gleiche network-Zeile): ebenfalls
|
||||||
|
# real getestet, haengt identisch. Also nicht --activate selbst der
|
||||||
|
# Ausloeser -- schon die blosse Angabe von --essid/--wpakey auf einer
|
||||||
|
# network-Zeile lasst Anaconda den Dracut-Hook fuer dieses Geraet ausfuehren,
|
||||||
|
# unabhaengig vom Aktivierungs-Flag.
|
||||||
|
#
|
||||||
|
# Versuch 3 (dieser): network-Zeile komplett ohne WLAN-Details (nur noch
|
||||||
|
# Hostname), damit Dracut fuer wlan0 gar nichts versucht. WLAN-Verbindung
|
||||||
|
# stattdessen per %pre-Skript ueber nmcli -- %pre laeuft laut
|
||||||
|
# Kickstart-Ablauf bereits in Anacondas voller install.img-Umgebung (nach
|
||||||
|
# dem Stage2-Laden, vor der Paketinstallation), also genau dort, wo
|
||||||
|
# wpa_supplicant vorhanden ist. Kein Hack, nmcli ist offiziell fuer genau
|
||||||
|
# diesen Zweck vorgesehen.
|
||||||
|
#
|
||||||
|
# %packages braucht danach echtes Netz (dies ist ein Netinstall-Repo, keine
|
||||||
|
# lokalen Pakete) -- ein vollstaendiger Durchlauf beweist also, dass die
|
||||||
|
# WPA-Anmeldung ueber nmcli tatsaechlich funktioniert hat.
|
||||||
|
|
||||||
|
text
|
||||||
|
reboot
|
||||||
|
|
||||||
|
lang de_DE.UTF-8
|
||||||
|
keyboard de
|
||||||
|
timezone Europe/Berlin --utc
|
||||||
|
|
||||||
|
rootpw --plaintext test123
|
||||||
|
user --name=tuxflotte --groups=wheel --password=test123
|
||||||
|
|
||||||
|
network --hostname=fedora-wlan-test
|
||||||
|
|
||||||
|
zerombr
|
||||||
|
clearpart --all --initlabel
|
||||||
|
autopart
|
||||||
|
|
||||||
|
firewall --enabled
|
||||||
|
selinux --enforcing
|
||||||
|
|
||||||
|
bootloader --location=mbr
|
||||||
|
|
||||||
|
%pre
|
||||||
|
nmcli device wifi connect stallinux password a987654321 ifname wlan0
|
||||||
|
ec=$?
|
||||||
|
{
|
||||||
|
echo "tuxflotte: %pre nmcli exit=${ec}"
|
||||||
|
nmcli device status
|
||||||
|
nmcli connection show
|
||||||
|
} > /tmp/tuxflotte-wlan-pre.log 2>&1
|
||||||
|
exit 0
|
||||||
|
%end
|
||||||
|
|
||||||
|
%packages
|
||||||
|
@core
|
||||||
|
vim
|
||||||
|
curl
|
||||||
|
%end
|
||||||
|
|
||||||
|
%post
|
||||||
|
cat > /etc/motd <<'EOF'
|
||||||
|
wlan-netinst-test (ADR-0009 Ultima Ratio, WLAN-Schritt) -- provisioned by tuxflotte
|
||||||
|
EOF
|
||||||
|
echo "tuxflotte: wlan-netinst-test %post lief durch." >> /var/log/tuxflotte-postinstall.log
|
||||||
|
%end
|
||||||
Loading…
x
Reference in New Issue
Block a user