qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Qemu doesn't detect hard drive
@ 2020-04-03  5:16 Aijaz.Baig
  2020-04-03  7:39 ` Peter Maydell
  0 siblings, 1 reply; 6+ messages in thread
From: Aijaz.Baig @ 2020-04-03  5:16 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

[-- Attachment #1: Type: text/plain, Size: 1677 bytes --]

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.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #2: Type: text/html, Size: 2148 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-03 12:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-03  5:16 Qemu doesn't detect hard drive Aijaz.Baig
2020-04-03  7:39 ` Peter Maydell
2020-04-03  8:01   ` Aijaz.Baig
2020-04-03  8:45     ` Peter Maydell
2020-04-03 11:07   ` Philippe Mathieu-Daudé
2020-04-03 12:11     ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).