0

System: Ubuntu 20.04 on WSL2 (Windows Subsystem for Linux)

I can launch ext4 image using 'runqemu' tool if I build the image using yocto. But I have not built the image locally, I have installed qemu. If I try to launch using this command

qemu-system-x86_64 -drive format=raw,file=core-image-qemux86-64.ext4

it gives me this error

Unable to init server: Could not connect: Connection refused WARNING: Image format was not specified for 'core-image-qemux86-64.ext4' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. qemu-system-x86_64: ext4: drive with bus=0, unit=0 (index=0) exists

Would be great if anybody could help, thanks!

3
  • 2
    Ext4 is a filesystem, so I guess what you supplies is an image of a partition, not of a disk including the bootloader Commented Oct 9, 2022 at 3:01
  • @MarcusMüller In my directory, I have these 4 files, bzImage, core-image-qemux86-64.ext4, core-image-qemux86-64.qemuboot.conf, core-image-qemux86-64.tar.gz am I missing disk image?
    – TonyParker
    Commented Feb 6, 2023 at 16:03
  • you don't necessarily need a disk image to boot – I'm not sure what these files are in your case, but it would seem that they're not disk, but a partition images… Something called "somethingsomething.qemuboot.conf" smells a lot like OpenEmbedded/bitbake. I bet all the relevant information needed to properly launch qemu are in there! Commented Feb 6, 2023 at 17:32

1 Answer 1

0
qemu-system-x86_64 -kernel bzImage -drive file=core-image-qemux86-64.ext4 -append "root=/dev/hda console=ttyS0" -nographic
  • bzImage is a kernel image
  • core-image-qemux86-64.ext4 is a filesystem image
  • nographic I am running Linux in WSL2 so I do not have GUI so I want to have just CLI based qemu launch.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .