Qemu /dev/zero

May 18, 2008 4 Replies

Hi all,



I was emulating kernel image and rootfs using qemu.



qemu -kernel vmlinuz-2.6.22.17-0.1-default -initrd test.cpio.gz /dev/ zero as mentioned in ramfs-rotfs documentation. every thing works fine. But i have some confusion here...



What is the role of /dev/zero.



anyone please explain..



Regards, Nabendu


Search at google with: "what is /dev/zero for" turned up:

Results 1 - 10 of about 400,000 for what is /dev/zero for. (0.29 seconds)

Best result is:

formatting link

YOU could have done the same...

Jerry McBride (jmcbride@mail-on.us)

I think i wanted to know "what is the role of /dev/zero here?"..in the qemu command..

qemu -kernel vmlinuz-2.6.22.17-0.1-default -initrd test.cpio.gz /dev/ zero

when i am not using /dev/zero qemu is executing and shutting down the run window..why thats so..

Regards, Nabendu

Nabendu schrieb:

Qemu requires you to specify a hard disk to boot from. Obviously, if you load a kernel directly and have your root file system on a ramdisk, you don't need it. But you still have to specify it: Your emulated hda is /dev/zero - nothing.

Another approach would be to have a command line like:

qemu -kernel vmlinux-2.6 -initrd test.cpio.gz -hda /dev/zero

You could have read this in the Qemu documentation, too. It is mentioned there.

Regards, Sebastian

Thanks a lot.I should have read that.

Regards, Nabendu

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required