I’m trying to boot a Linux kernel in qemu.
$ qemu-system-x86_64
-kernel ./linux-stable/vmlinux
-M q35
-initrd initramfs.cpio.gz
-drive file=./hd,if=virtio,format=raw
-nographic
--append "root=/dev/vda console=tty0 console=ttyS0"
-vga none
-display none
-debugcon file:debug.log -global isa-debugcon.iobase=0x402 $@
Qemu gets stuck booting from ROM.
SeaBIOS (version 1.15.0-1)
iPXE (https://ipxe.org) 00:01.0 C000 PCI2.10 PnP PMM+07F8B0D0+07ECB0D0 C000
Booting from ROM..
The debug.log shows this repeating message.
In resume (status=0)
In 32bit resume
Attempting a hard reboot
Unable to unlock ram - bridge not found
My environment (WSL2 Ubuntu)
$ uname -r
5.15.167.4-microsoft-standard-WSL2
$ qemu-system-x86_64 --version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.24)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
$ file ./linux-stable/vmlinux
./linux-stable/vmlinux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=4b53daf1502c032d1d61d069c7e7f5d432c03b8e, with debug_info, not stripped