fix(grub): put ttyAMA0 last so it's the primary console on ARM64
Some checks failed
CI / Go Tests (push) Successful in 1m29s
CI / Shellcheck (push) Failing after 40s
CI / Build Go Binaries (amd64, linux, linux-amd64) (push) Failing after 1m21s
CI / Build Go Binaries (arm64, linux, linux-arm64) (push) Failing after 1m9s

Kernel takes the last `console=` argument as primary (where init's stdout/stderr
land). The previous order had ttyS0 last, which is a dead device on QEMU virt
and most ARM64 SBCs — so init output disappeared and we only saw kernel panic
messages (which use earlycon, bypassing the console preference).

Also drop `quiet` from the default boot entry while we stabilise — we need the
kernel + init output visible right now.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-14 14:11:58 -06:00
parent c20f5a2e8c
commit 05ab108de1

View File

@@ -51,25 +51,32 @@ else
fi fi
# --- ARM64 console string --- # --- ARM64 console string ---
# Covers QEMU virt (ttyAMA0), Ampere/RPi-equivalent PL011 (ttyAMA0), and # Order matters: the LAST `console=` is the primary system console (where /dev/console
# Graviton/16550-compat (ttyS0). Last `console=` becomes the system console. # points and where init's stdout/stderr land). Earlier `console=` entries get mirrored
# kernel output but don't carry process I/O.
#
# Covers Graviton/16550 (ttyS0) as secondary and QEMU virt / PL011 / Ampere (ttyAMA0)
# as primary. ttyAMA0 must be last for `-nographic` QEMU + most ARM64 SBCs.
#
# `quiet` is intentionally omitted from the default entry while we stabilise the
# generic ARM64 boot path. Add back once boots are reliable.
menuentry "KubeSolo OS (${slot_label})" { menuentry "KubeSolo OS (${slot_label})" {
echo "Booting KubeSolo OS from ${slot_label}..." echo "Booting KubeSolo OS from ${slot_label}..."
echo "Boot counter: ${boot_counter}, Boot success: ${boot_success}" echo "Boot counter: ${boot_counter}, Boot success: ${boot_success}"
linux /vmlinuz kubesolo.data=LABEL=KSOLODATA console=ttyAMA0,115200 console=ttyS0,115200 quiet linux /vmlinuz kubesolo.data=LABEL=KSOLODATA console=ttyS0,115200 console=ttyAMA0,115200
initrd /kubesolo-os.gz initrd /kubesolo-os.gz
} }
menuentry "KubeSolo OS (${slot_label}) — Debug Mode" { menuentry "KubeSolo OS (${slot_label}) — Debug Mode" {
echo "Booting KubeSolo OS (debug) from ${slot_label}..." echo "Booting KubeSolo OS (debug) from ${slot_label}..."
linux /vmlinuz kubesolo.data=LABEL=KSOLODATA kubesolo.debug console=ttyAMA0,115200 console=ttyS0,115200 linux /vmlinuz kubesolo.data=LABEL=KSOLODATA kubesolo.debug console=ttyS0,115200 console=ttyAMA0,115200
initrd /kubesolo-os.gz initrd /kubesolo-os.gz
} }
menuentry "KubeSolo OS — Emergency Shell" { menuentry "KubeSolo OS — Emergency Shell" {
echo "Booting to emergency shell..." echo "Booting to emergency shell..."
linux /vmlinuz kubesolo.shell console=ttyAMA0,115200 console=ttyS0,115200 linux /vmlinuz kubesolo.shell console=ttyS0,115200 console=ttyAMA0,115200
initrd /kubesolo-os.gz initrd /kubesolo-os.gz
} }
@@ -81,6 +88,6 @@ menuentry "KubeSolo OS — Boot Other Slot" {
set root='(hd0,gpt2)' set root='(hd0,gpt2)'
echo "Booting from System A (passive)..." echo "Booting from System A (passive)..."
fi fi
linux /vmlinuz kubesolo.data=LABEL=KSOLODATA kubesolo.debug console=ttyAMA0,115200 console=ttyS0,115200 linux /vmlinuz kubesolo.data=LABEL=KSOLODATA kubesolo.debug console=ttyS0,115200 console=ttyAMA0,115200
initrd /kubesolo-os.gz initrd /kubesolo-os.gz
} }