may be adding media=disk to the drive definition : -drive if=none,format=raw,file=disk.img,media=disk otherwise, are you sure you packed the right stuff to detect the disc?
Le ven. 3 avr. 2020 à 07:28, <aijaz.b...@protonmail.com> a écrit : > 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. > > > > >