qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QEMU doesn't recognize block device file


From: Aijaz . Baig
Subject: QEMU doesn't recognize block device file
Date: Fri, 03 Apr 2020 05:27:49 +0000

Hi

I have a working QEMU image emulating an ARM vexpress-a9 and I run it like so:

 

`sudo qemu-system-arm -m 512M -M vexpress-a9 -D qemu.log -d unimp -kernel buildroot-2019.02.5/output/images/zImage -dtb buildroot-2019.02.5/output/images/vexpress-v2p-ca9.dtb -append "console=ttyAMA0,115200 kgdboc=kbd,ttyAMA0,115200 ip=dhcp nokaslr" -initrd buildroot-2019.02.5/output/images/rootfs.cpio -nographic -net nic -net bridge,br=mybridge -s`

 

I would now like to add a hard disk for persistent storage and then transfer control from busybox initrd based rootfs over to the full fledged version offered with Linux. So I add it to the command line

 

`sudo qemu-system-arm -m 1024M -M vexpress-a9 -D qemu.log -drive if=none,format=raw,file=disk.img -kernel buildroot-2019.02.5/output/images/zImage -dtb buildroot-2019.02.5/output/images/vexpress-v2p-ca9.dtb -append "console=ttyAMA0,115200 kgdboc=kbd,ttyAMA0,115200 ip=dhcp nokaslr" -initrd buildroot-2019.02.5/output/images/rootfs.cpio -nographic -net nic -net bridge,br=mybridge -s

`

 

of course I first create a disk image and format it as ext2:

`qemu-img create disk.img 10G && mkfs.ext2 -F disk.img`

 

From the log messages I see that it has not been able to detect this at all. Can someone please summarize how block devices work with Qemu. I know the older `-hda` has been changed to a newer `-drive` option can combines the cumbersome specification of the front and back ends separately. But I don't know the basics and why I am getting this problem.

 

I am basically looking to `switch_root` from initrd to the full fledged Linux rootfs but this is only the first step.

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]