QEMU > Serial console
In the guest /etc/default/grub:
GRUB_CMDLINE_LINUX="console=ttyS0,115200n8"
qemu-system-x86_64 \
...
-chardev socket,server=on,wait=off,logfile=serial.log,id=serial0,path=console.sock \
-serial chardev:serial0 \
...
socat stdin,raw,nonblock,echo=0,escape=0x0f unix-connect:console.sock
0x0f
is the sequence for ctrl+o
, press it to exit socat
.
To figure out possible key sequences you can use the showkey
command in ASCII
mode:
# doas showkey -a
Press any keys - Ctrl-D will terminate this program
a 97 0141 0x61
b 98 0142 0x62
c 99 0143 0x63
d 100 0144 0x64
e 101 0145 0x65
^O 15 0017 0x0f
20:00 20.02.2024