[Cin] Virtualized Fedora armhf

Mat mnieuw at zap.a2000.nl
Mon Feb 27 14:09:47 CET 2023


Hi Andrew,

I got it to work almost first time inclusive network. Key was the extra
kernel cmd line option you gave: rootflags=subvol=/root .

Because the only user on the system is root, which is disabled for
login, I tried your init=/bin/bash , but that did not work .

So I manually added a user to /etc/passwd, /etc/shadow, /etc/group (and
made the user member of group "wheel" to be able to do sudo), I copied
the user entries for those files from the host system.

Reboot (> 5 minutes), login, and it complains about /home/<user>
missing. As sudo, easily corrected. The VM was very busy, "top" showed
coredumps and backtraces being generated, Xorg was crashing. 
"Sudo systemctl disable lightdm", then "Sudo systemctl stop
lightdm" .

Eventually system activity died down, and it is was reasonably fast.

I added file /etc/modules-load.d/modules.conf, and put virtio_gpu 
in there. After reboot, Xorg still crashes, so more to be done.
virtio_gpu is the recommended (by qemu) video for machine "virt" .
On Debian_armhf, I also see (lsmod) drm modules loaded, but on Fedora
with modprobe no success, and on Debian Xorg does not work either :-)

I prefer SSH over the startup terminal, because Ctrl-C in the latter
kills the VM. That only happened to me 100 times or so :-)

Below is my current startup script:
=====
#!/bin/bash

Disk=/home/mat/Qemu/Fedora36_armhf/Fedora-Xfce-36-1.5.armhfp.qcow2
Version=5.17.5-300.fc36.armv7hl

qemu-system-arm \
    -machine virt \
    -m 4096 \
    -cpu cortex-a15 \
    -smp cpus=8,maxcpus=8 \
    -append "root=/dev/vda3 console=ttyAMA0 earlyprintk=ttyAMA0
console=tty1 rootflags=subvol=/root" \
    -kernel ./vmlinuz-$Version \
    -initrd ./initramfs-$Version.img \
    -device virtio-blk-device,drive=hd0 \
    -drive
file=$Disk,if=none,format=qcow2,id=hd0,discard=unmap,detect-zeroes=unmap \
    -serial stdio \
    -netdev user,id=n0,hostfwd=tcp::10122-:22 \
    -device virtio-net-device,netdev=n0 \
    -device virtio-rng-pci \
    -device virtio-gpu-pci -display sdl
=====




More information about the Cin mailing list