qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Guest Ubuntu 18.04 fails to boot with -serial mon:stdio, cannot find tty


From: David Fernandez
Subject: Guest Ubuntu 18.04 fails to boot with -serial mon:stdio, cannot find ttyS0.
Date: Mon, 8 Nov 2021 18:03:51 +0000

Hi there,

I am running qemu-system-x86_64 on aarch64 running Ubuntu 18.04 as both 
guest and host.

I couldn't get the stock qemu-system-x86_04 to boot correctly, as it was 
an old version 2.11.1, I decided to recompile from sources to see if 
that would fix the problem, but the problem still persists, using both 
top of master and stable-2.12 (currently on that).[ TIME ] Timed out 
waiting for device dev-ttyS0.device.

The problem does not happen when using qemu-system-x86_64 on my Fedora 
desktop as host, so I wonder if I need something in my build options or 
if I need to rebuild my kernel with some added kernel configuration 
options...

Hopefully, some experts around here can help me with that if it is a 
known thing (I google around but other than mentioning that 2.11 is too 
old, could not find any clear reason about this problem).

Let me know if any more information is needed, I did not want to flood 
the list with lots of logs straight away, but a few bit are:

$ uname -a
Linux vpm-devkit 4.9.201-tegra #1 SMP PREEMPT Fri Jul 2 15:24:18 BST 
2021 aarch64 aarch64 aarch64 GNU/Linux

$ cat /proc/cpuinfo
processor       : 0
model name      : ARMv8 Processor rev 0 (v8l)
BogoMIPS        : 62.50
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics 
fphp asimdhp
CPU implementer : 0x4e
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0x004
CPU revision    : 0
MTS version     : 51035886

... 8 cpus ...

My build options (I did not do cross-compiling, as I was a bit unsure 
about pkg-config/glib-2.0 for build and host/target, so I compiled 
natively on the host machine, used a separate build folder):

../configure \
   --target-list=x86_64-softmmu \
   --enable-plugins \
   --enable-attr \
   --enable-auth-pam \
   --enable-cap-ng \
   --enable-curl \
   --enable-gnutls \
   --enable-kvm \ <== does not seem to ba available as an accelerator
   --enable-libnfs \
   --enable-libudev \
   --enable-libusb \
   --enable-libxml2 \
   --enable-linux-aio \
   --enable-nettle \
   --enable-seccomp \
   --enable-snappy \
   --enable-spice \
   --enable-spice-protocol \
   --enable-usb-redir \
   --enable-vde \
   --enable-virtfs \
   --enable-virtiofsd \
   --enable-xkbcommon \
   --enable-pie \
   --enable-modules \
   --enable-membarrier \
   --enable-lto \
   --enable-tools \
   --enable-vvfat

Installed as per the defaults in /usr/local (the distro already have 
that in the path before the standard distro folders, so all runs as 
expected):

$ which qemu-system-x86_64
/usr/local/bin/qemu-system-x86_64

Some things like the following could not be used due to current kernel 
or ubuntu packages available (perhaps I need to compile fuse from sources?):

- --enable-libpmem (absent package, couldn't find the right one)
- --enable-libssh (0.8.0 but >= 0.8.7 for libssh-4-dev)
- --enable-fuse --enable-fuse-lseek (fuse2 available but fuse3 needed)
- --enable-netmap (not in current kernel kernel, the required header 
only exists for newer kernels)

I run it like this:

qemu-system-x86_64 \
   -boot order=dc,menu=on \
   -cdrom ubuntu-18.04.6-live-server-amd64.iso \
   -nographic \
   -serial mon:stdio \
   -kernel ufm/vmlinuz \
   -initrd ufm/initrd \
   -append 'boot=casper console=ttyS0 ---' \
   -m 16384 \
   -drive  file=ufm/ufm.fd0,format=raw,if=floppy \ <= empty image to 
avoid ubuntu complaining about fd0.
   -drive  file=ufm/ufm.img,format=raw,if=ide \
   -netdev bridge,br=virbr0,id=net0 \
   -device virtio-net-pci,netdev=net0,id=nic1 \
   -device usb-ehci,id=ehci

The vmlinuz & initrd come from the ubuntu iso in the casper folder (if I 
remember correectly), the append uses what the grub configuration had 
for the normal default kernel in the iso.

The virtual bridge works as expected with the right allow line in 
/usr/local/etc/qemu/bridge.conf and setting the qemu-bridge-helper u+s 
(plus a few extra packages).

Anything else is as per the Ubunt u 18.04.5 (LTS) repos used by the host 
(I did not upgraded the packages, other than the packages needed to get 
the bridge working and the dev packages to compile the qemu on the aarch64).

Regards



reply via email to

[Prev in Thread] Current Thread [Next in Thread]