qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Qemu Boot failure with /dev/ram0
@ 2013-09-16  5:40 Saptarshi Sen
  2013-10-11  7:11 ` Philipp Hahn
  0 siblings, 1 reply; 2+ messages in thread
From: Saptarshi Sen @ 2013-09-16  5:40 UTC (permalink / raw)
  To: qemu-devel

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

Hi,

   I want to use a ram disk as a block device for my kernel.( i am
measuring file io on ram )

   I am trying to boot a kernel from using /dev/ram0. However I am getting
"No root Device found"

   qemu-system-x86_64 -m  8G -hda disk.img -kernel vmlinuz-3.10.0-rc6
-initrd initramfs-3.10.0-rc6.img -append "root=/dev/ram0 selinux=0
enforcing=0 rw" -vnc :0

   My rootfs has a /dev/ram0.


Saptarshi

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

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

* Re: [Qemu-devel] Qemu Boot failure with /dev/ram0
  2013-09-16  5:40 [Qemu-devel] Qemu Boot failure with /dev/ram0 Saptarshi Sen
@ 2013-10-11  7:11 ` Philipp Hahn
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Hahn @ 2013-10-11  7:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Saptarshi Sen

Hello,

On Monday 16 September 2013 07:40:08 Saptarshi Sen wrote:
>    I want to use a ram disk as a block device for my kernel.( i am
> measuring file io on ram )
> 
>    I am trying to boot a kernel from using /dev/ram0. However I am getting
> "No root Device found"
> 
>    qemu-system-x86_64 -m  8G -hda disk.img -kernel vmlinuz-3.10.0-rc6
> -initrd initramfs-3.10.0-rc6.img -append "root=/dev/ram0 selinux=0
> enforcing=0 rw" -vnc :0

Perhaps you're mixing "Initial*RamFS*" and "Initial*RootDisk*"? Your filename "initramfs" indicates you're going for the former, but your "root=/dev/ram0" is required fror InitRD.

InitRamFS is a (compressed) CPIO archive, which is extracted to a dynamically growing "tmpfs" by the kernel.
InitRD is a (compressed) ext2/3/4/jfs/xfs/whatever filesystem, which is backed by a fixed portion of you RAM; you probably need to explicitly specify a "ramdisk_size=250000" parameter to be large enougth to contain the uncompressed file-system. If the size is too small, you will have a corrupt FS where you also get the error you mention above.

Sincerely
Philipp
-- 
Philipp Hahn           Open Source Software Engineer      hahn@univention.de
Univention GmbH        be open.                       fon: +49 421 22 232- 0
Mary-Somerville-Str.1  D-28359 Bremen                 fax: +49 421 22 232-99
                                                   http://www.univention.de/
Director:Peter H. Ganten   HRB 20755 Amtsgericht Bremen   UID:DE 220 051 310

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

end of thread, other threads:[~2013-10-11  7:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16  5:40 [Qemu-devel] Qemu Boot failure with /dev/ram0 Saptarshi Sen
2013-10-11  7:11 ` Philipp Hahn

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).