[Cin] Virtualized Fedora armhf

Andrew Randrianasulu randrianasulu at gmail.com
Fri Feb 17 20:04:53 CET 2023

so, I downloaded image and converted it to qcow2 (after unxz ing it - 11Gb!)

 qemu-img convert Fedora-Xfce-36-1.5.armhfp.raw
Fedora-Xfce-36-1.5.armhfp.qcow -O qcow2

much better just less than 5Gb

qemu-img info Fedora-Xfce-36-1.5.armhfp.qcow
image: Fedora-Xfce-36-1.5.armhfp.qcow
file format: qcow2
virtual size: 11 GiB (11811160064 bytes)
disk size: 4.44 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false

losetup -P -f Fedora-Xfce-36-1.5.armhfp.raw
# mount /dev/loop1p2 /mnt/test

# ls /mnt/test/
.vmlinuz-5.17.5-300.fc36.armv7hl.hmac  grub2/
System.map-5.17.5-300.fc36.armv7hl     initramfs-5.17.5-300.fc36.armv7hl.img
config-5.17.5-300.fc36.armv7hl         loader/
dtb/                                   lost+found/
dtb-5.17.5-300.fc36.armv7hl/           symvers-5.17.5-300.fc36.armv7hl.gz
efi/                                   vmlinuz-5.17.5-300.fc36.armv7hl

so I copied everything to folder where I have qemu images
and  unmounted /mnt/test and disassociated loop device

#losetup -d /dev/loop1

now as user (finding right params was such a journey!)

using qemu post 7.2.0, so you can use just "-machine virt", not virt-8.0

qemu-system-arm -drive
-device virtio-net-device -device virtio-blk-device,drive=c -kernel
fedora-armhf/vmlinuz-5.17.5-300.fc36.armv7hl -initrd
fedora-armhf/initramfs-5.17.5-300.fc36.armv7hl.img -m 2000 -machine
virt-8.0 -smp 3 -accel tcg,thread=multi -append "root=/dev/vda3 rw

watch out serial output

after may be 15+ minutes .. (systemd run twice -  once in ititrd, once
 from real root)

finally booted to login prompt!

aaaah, you probably need to set user and root passwords via
passwd/useradd by booting with
"init=/bin/bash" in addition to root=/dev/vda3 rw rootflags=subvol=/root

and do "touch /.autorelabel" while in single user mode. Without this
login will stuck!
then remount / as ro and reboot vai /sbin/reboot -f (may be poweroff
was better, because we boot again into single user!)

or may be this line is better ?

qemu-system-arm -drive
-device virtio-net-device,netdev=mynet -device
virtio-blk-device,drive=c -kernel
fedora-armhf/vmlinuz-5.17.5-300.fc36.armv7hl -initrd
fedora-armhf/initramfs-5.17.5-300.fc36.armv7hl.img -m 2000 -machine
virt-8.0 -smp 3 -accel tcg,thread=multi,tb-size=256 -append
"root=/dev/vda3 rw rootflags=subvol=/root" -netdev user,id=mynet

still can't get network to run :/


On Fri, Feb 17, 2023 at 8:09 AM Andrew Randrianasulu
<randrianasulu at gmail.com> wrote:
> So I was looking at easy way to get fedora-arm/aarch64 (because install is so slow ....)
> May be this guide can help (assumes Fedora as base os):
> https://michel-slm.name/posts/2020-08-20-fedora-armhfp-vm/
> while I looked at slightly different image location, for newer os image (2.8 gb for xfce4 image!)
> https://dl.fedoraproject.org/pub/fedora/linux/releases/36/Spins/armhfp/images/
> namely
> https://dl.fedoraproject.org/pub/fedora/linux/releases/36/Spins/armhfp/images/Fedora-Xfce-36-1.5.armhfp.raw.xz
> for Fedora 37 I only found aarch64 image (small one, so you need to install a lot!)..
> https://dl.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/aarch64/images/

More information about the Cin mailing list