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/image... namely https://dl.fedoraproject.org/pub/fedora/linux/releases/36/Spins/armhfp/image... 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/imag...
On 2/17/23 00:09, Andrew Randrianasulu via Cin 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/image...
namely https://dl.fedoraproject.org/pub/fedora/linux/releases/36/Spins/armhfp/image...
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/imag...
I dumped fedora a few years ago. Their compressed release schedule and quick inclusion of all the latest LP abominations meant that I spent too much time fighting the system and not being able to get real work done. Did a short stint with centos, but they weren't keeping the rpmfusion stuff I needed up to date, so then I jumped over to the debian camp. Been using debian for a couple of years now and am happy with the LTS policies and huge applications repos.
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 "if=none,id=c,file=./Fedora-Xfce-36-1.5.armhfp.qcow,discard=on" -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 rootflags=subvol=/root" 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 "if=none,id=c,file=./Fedora-Xfce-36-1.5.armhfp.qcow,discard=on" -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 :/ https://wiki.archlinux.org/title/Btrfs#Installing_with_root_on_btrfs_subvolu... https://github.com/husqvarnagroup/smart-garden-u-boot/blob/master/doc/README... On Fri, Feb 17, 2023 at 8:09 AM Andrew Randrianasulu <[email protected]> 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/image...
namely https://dl.fedoraproject.org/pub/fedora/linux/releases/36/Spins/armhfp/image...
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/imag...
Hi Andrew, I use the below .sh start script for Debian on armhf, network works fine last time I tried it. You can modify inside the virtual disk if you mount it as a nbd loop device, I seem to remember if I did it your way it was read-only, but that was year ago. I used it to change the root password to no password at all when I forgot it.... MatN ==== #!/bin/bash # note: after succesfull install and working network access (apt), comment out the cdrom from # /etc/apt/sources.list ISO=/mnt/DataCommon/ISOs/Debian_11/debian-11.1.0-armhf-netinst.iso # Because qemu must be started with a direct kernel parameter, use a variable to specify # the version. After a kernel update, extract the proper vmlinuz and initrd files from the client, # and place them in the directory where this script is started from, then update the VERSION # accordingly. VERSION=5.10.0-18 qemu-system-arm -machine virt -cpu cortex-a15 -smp cpus=8,maxcpus=8 --append "root=/dev/vda1 console=ttyAMA0 earlyprintk=ttyAMA0" \ -kernel ./vmlinuz-$VERSION-armmp-lpae -initrd ./initrd.img-$VERSION-armmp-lpae -m 4096 \ -netdev user,id=n0,hostfwd=tcp::10022-:22,smb=/home/mat/qemu_shared_folder -device virtio-net-device,netdev=n0 \ -drive file=debian11-arm.qcow2,if=none,format=qcow2,id=hd0 -device virtio-blk-device,drive=hd0 \ -serial stdio =============
I see the mail corrupted the script lines, each time there is a backslash a new line should follow. MatN On Fri, 17 Feb 2023 23:48:43 +0100 Mat via Cin <[email protected]> wrote:
Hi Andrew,
I use the below .sh start script for Debian on armhf, network works fine last time I tried it. You can modify inside the virtual disk if you mount it as a nbd loop device, I seem to remember if I did it your way it was read-only, but that was year ago. I used it to change the root password to no password at all when I forgot it....
MatN
==== #!/bin/bash
# note: after succesfull install and working network access (apt), comment out the cdrom from # /etc/apt/sources.list ISO=/mnt/DataCommon/ISOs/Debian_11/debian-11.1.0-armhf-netinst.iso
# Because qemu must be started with a direct kernel parameter, use a variable to specify # the version. After a kernel update, extract the proper vmlinuz and initrd files from the client, # and place them in the directory where this script is started from, then update the VERSION # accordingly. VERSION=5.10.0-18
qemu-system-arm -machine virt -cpu cortex-a15 -smp cpus=8,maxcpus=8 --append "root=/dev/vda1 console=ttyAMA0 earlyprintk=ttyAMA0" \ -kernel ./vmlinuz-$VERSION-armmp-lpae -initrd ./initrd.img-$VERSION-armmp-lpae -m 4096 \ -netdev user,id=n0,hostfwd=tcp::10022-:22,smb=/home/mat/qemu_shared_folder -device virtio-net-device,netdev=n0 \ -drive file=debian11-arm.qcow2,if=none,format=qcow2,id=hd0 -device virtio-blk-device,drive=hd0 \ -serial stdio =============
сб, 18 февр. 2023 г., 01:48 Mat <[email protected]>:
Hi Andrew,
I use the below .sh start script for Debian on armhf, network works fine last time I tried it.
Thanks, it seems to use same -device virtio-net-device so may be fedora need some additional actions inside vm... You can modify inside the virtual disk if
you mount it as a nbd loop device, I seem to remember if I did it your way it was read-only, but that was year ago. I used it to change the root password to no password at all when I forgot it....
MatN
==== #!/bin/bash
# note: after succesfull install and working network access (apt), comment out the cdrom from # /etc/apt/sources.list ISO=/mnt/DataCommon/ISOs/Debian_11/debian-11.1.0-armhf-netinst.iso
# Because qemu must be started with a direct kernel parameter, use a variable to specify # the version. After a kernel update, extract the proper vmlinuz and initrd files from the client, # and place them in the directory where this script is started from, then update the VERSION # accordingly. VERSION=5.10.0-18
qemu-system-arm -machine virt -cpu cortex-a15 -smp cpus=8,maxcpus=8 --append "root=/dev/vda1 console=ttyAMA0 earlyprintk=ttyAMA0" \ -kernel ./vmlinuz-$VERSION-armmp-lpae -initrd ./initrd.img-$VERSION-armmp-lpae -m 4096 \ -netdev user,id=n0,hostfwd=tcp::10022-:22,smb=/home/mat/qemu_shared_folder -device virtio-net-device,netdev=n0 \ -drive file=debian11-arm.qcow2,if=none,format=qcow2,id=hd0 -device virtio-blk-device,drive=hd0 \ -serial stdio =============
сб, 18 февр. 2023 г., 05:11 Andrew Randrianasulu <[email protected]>:
сб, 18 февр. 2023 г., 01:48 Mat <[email protected]>:
Hi Andrew,
I use the below .sh start script for Debian on armhf, network works fine last time I tried it.
Thanks, it seems to use same -device virtio-net-device so may be fedora need some additional actions inside vm...
Turned out virt-2.11 was *really* important for Fedora, with this option I have network device inside vm, and after some battle with systemd (something inside network service depend on dbus .. bad surprize for someone who disabled dbus earlier! Started it back by systemctl enable dbus-daemon. Also, for some reason resolv.conf was set wrong, so I just moved systemd's created resolv.conf symlink from /etc and run dhclient directly ...) dnf seems to work its way towards installing midnight commander! I not dare to say when it might finis it, so I can try to install gcc and friends ... But progress!
You can modify inside the virtual disk if
you mount it as a nbd loop device, I seem to remember if I did it your way it was read-only, but that was year ago. I used it to change the root password to no password at all when I forgot it....
MatN
==== #!/bin/bash
# note: after succesfull install and working network access (apt), comment out the cdrom from # /etc/apt/sources.list ISO=/mnt/DataCommon/ISOs/Debian_11/debian-11.1.0-armhf-netinst.iso
# Because qemu must be started with a direct kernel parameter, use a variable to specify # the version. After a kernel update, extract the proper vmlinuz and initrd files from the client, # and place them in the directory where this script is started from, then update the VERSION # accordingly. VERSION=5.10.0-18
qemu-system-arm -machine virt -cpu cortex-a15 -smp cpus=8,maxcpus=8 --append "root=/dev/vda1 console=ttyAMA0 earlyprintk=ttyAMA0" \ -kernel ./vmlinuz-$VERSION-armmp-lpae -initrd ./initrd.img-$VERSION-armmp-lpae -m 4096 \ -netdev user,id=n0,hostfwd=tcp::10022-:22,smb=/home/mat/qemu_shared_folder -device virtio-net-device,netdev=n0 \ -drive file=debian11-arm.qcow2,if=none,format=qcow2,id=hd0 -device virtio-blk-device,drive=hd0 \ -serial stdio =============
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 =====
participants (3)
-
Andrew Randrianasulu -
Mat -
Rob Prowel