fix: PXE boot debugging — bisect root cause, syslog logging, serial console #3

Merged
michal merged 31 commits from wip/ks-debugging into main 2026-03-29 00:50:05 +00:00
Showing only changes of commit 520af41a52 - Show all commits

View File

@@ -72,7 +72,18 @@ export function registerApiRoutes(
const stageName = stage ?? "unknown";
const detailStr = detail ?? "";
logger.info(`Progress: ${mac} ${stageName}${detailStr ? ` -- ${detailStr}` : ""}`);
const GREEN = "\x1b[0;32m";
const YELLOW = "\x1b[1;33m";
const RED = "\x1b[0;31m";
const BOLD = "\x1b[1m";
const RESET = "\x1b[0m";
const icons: Record<string, string> = {
partitioning: "◆", installing: "◆◆", "post-install": "◆◆◆",
complete: "✔", error: "✘",
};
const icon = icons[stageName] ?? "·";
const color = stageName === "complete" ? GREEN : stageName === "error" ? RED : YELLOW;
console.log(` ${color}${icon}${RESET} ${mac} ${BOLD}${stageName}${RESET}${detailStr ? ` -- ${detailStr}` : ""}`);
state.update((s) => {
const queueEntry = s.install_queue[mac];
@@ -100,7 +111,8 @@ export function registerApiRoutes(
};
s.installed[mac] = installedInfo;
logger.info(`INSTALL COMPLETE: ${mac} -> ${installedInfo.hostname} (${ip})`);
const admin = state.load().installed[mac]?.role ? "michal" : "root";
console.log(`\n \x1b[0;32m\x1b[1m ssh ${admin}@${ip}\x1b[0m\n`);
}
}
});