Add ISO build tooling and serial console support

- Add bin/yino-iso with download, build, and clean subcommands for
  creating a preseeded Debian installer ISO
- Add --serial flag to bin/yino-vm boot for headless serial console
- Add offline installation ISO spec to FSD (section 6)
- Update README TODO to reflect ISO pipeline progress

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael Smith
2026-02-18 00:47:23 +01:00
parent 5fa89444d7
commit 17fa52824c
4 changed files with 233 additions and 8 deletions

View File

@@ -138,8 +138,13 @@ cmd_boot() {
fi
local iso_args=()
local serial=false
while [[ $# -gt 0 ]]; do
case "$1" in
--serial)
serial=true
shift
;;
--iso)
if [[ -z "${2:-}" ]]; then
echo "Error: --iso requires a path argument." >&2
@@ -154,14 +159,23 @@ cmd_boot() {
;;
*)
echo "Error: Unknown option: $1" >&2
echo "Usage: yino-vm boot [--iso PATH]" >&2
echo "Usage: yino-vm boot [--serial] [--iso PATH]" >&2
exit 1
;;
esac
done
local display_args
if [[ "$serial" == true ]]; then
display_args=(-serial mon:stdio -nographic -display none)
else
display_args=(-display cocoa -vga virtio)
fi
echo "Booting VM (accel=$accel, cpu=$cpu)..."
echo "SSH available at: ssh -p 2222 localhost"
if [[ "$serial" != true ]]; then
echo "SSH available at: ssh -p 2222 localhost"
fi
echo ""
qemu-system-x86_64 \
@@ -175,8 +189,7 @@ cmd_boot() {
-drive "if=pflash,format=raw,file=$UEFI_VARS" \
-device virtio-net-pci,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
-display cocoa \
-vga virtio \
"${display_args[@]}" \
"${iso_args[@]}"
}
@@ -226,7 +239,7 @@ Usage: yino-vm <command> [options]
Commands:
create Create VM disk image and UEFI vars
boot [--iso P] Boot the VM (--iso to attach installer ISO)
boot [opts] Boot the VM (--serial for console, --iso P for installer)
delete Delete VM disk image and UEFI vars
status Show VM status
help Show this help