Le 14/11/2025 à 14:33, [email protected] a écrit :
Hi,
I'm trying to boot a Debian raspberry Pi image under qemu; specifically,
it is
https://raspi.debian.net/tested/20231109_raspi_4_bookworm.img.xz
listed in
https://raspi.debian.net/tested-images/.
After downloading, checking sha256sum, unxz-ing and resizing the image
to 4G with qemu-img resize, this is the incantation I try:
qemu-system-aarch64 \
-display none \
-machine raspi4b \
-cpu cortex-a72 \
-dtb bcm2711-rpi-4-b.dtb \
-m 2G \
-smp 4 \
-serial stdio \
-kernel vmlinuz-6.1.0-13-arm64 \
-append "earlycon=pl011,mmio32,0xfe201000 \
console=ttyAMA0,115200 \
root=/dev/mmcblk1p2 \
rootfstype=ext4 \
fsck.repair=no \
rootwait \
init=/bin/bash" \
-initrd initrd.img-6.1.0-13-arm64 \
-drive format=raw,20231109_raspi_4_bookworm.img
(don't ask ;-)
But qemu complains
qemu-system-aarch64: could not load kernel 'vmlinuz-6.1.0-13-arm64'
Mounting the image's first partition (losetup -P, then mount the first,
e.g /dev/loop0p1) confirms that there is a "vmlinuz-6.1.0-13-arm64"
there, also a 20231109_raspi_4_bookworm.img (in that partition's file
systems root).
Could someone beat me with a clue stick to get one step further?
How does one go about debugging such a boot machinery?
Thanks for any insight.
Please keep [email protected] in CC since they aren't
subscribed.
Cheers
Hello Tomas,
I am definitely not familiar with the qemu syntax (I only use qemu
through wirt-manager and my usage is very basic)
So perhaps am I totally wrong here but I wonder if the -kernel option
does not imply that the guest and the host must share the same
architecture, so you could not launch an ARM guest from an AMD64 host,
if that is what you are trying to achieve (perhaps am I wrong on this
subject, too).
Or perhaps you can directly launch an ARM kernel by copying it in an
appropriate location on an AMD64 host, I do not know
From the Qemu doc:
https://qemu-project.gitlab.io/qemu/system/linuxboot.html
And from the qemu-system manpage:
[...]> Boot Image or Kernel specific
There are broadly 4 ways you can boot a system with QEMU.
• specify a firmware and let it control finding a kernel
• specify a firmware and pass a hint to the kernel to boot
• direct kernel image boot
• manually load files into the guest's address space
[...]