From: "Peter Teoh" <htmldeveloper@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] requirements of root filesystem image when passed to qemu
Date: Fri, 13 Jun 2008 01:14:56 +0800 [thread overview]
Message-ID: <804dabb00806121014o3833c844l2ba7206cb17ed8dd@mail.gmail.com> (raw)
First, after installing debian (8.04) on a qemu image - debian.cow - I
then used it to mount the latest kernel:
qemu -kernel /boot/vmlinuz-2.6.26-rc5 -hda debian.cow -append
"root=/dev/hda console=ttyS0" -nographic
[ 5.493332] 0300 1331200 hda driver: ide-disk
[ 5.494978] 0301 248976 hda1
[ 5.496151] 0302 1076355 hda2
[ 5.497403] No filesystem could mount root, tried: ext3 ext2 iso9660
[ 5.499552] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(3,0)
But when I downloaded the root filesystem image at:
http://bellard.org/qemu/download.html
for linux-0.2.img, and execute:
qemu -kernel /boot/vmlinuz-2.6.26-rc5 -hda linux-0.2.img -append
"root=/dev/hda console=ttyS0" -nographic
everything went through to the root prompt level, even though the
linux-0.2.img image has its own kernel version (0.2). And I noticed
that (using "file"):
linux-0.2.img: x86 boot sector, LInux i386 boot LOader
debian.cow: QEMU Copy-On-Write disk image version 1, size 0 + 1363148800
Next, using another rootfs image:
file FedoraCore5-x86-root_fs
FedoraCore5-x86-root_fs: x86 boot sector
I run qemu successfully.
Next I entered ubuntu installation image:
ubuntu-8.04-desktop-i386.iso: ISO 9660 CD-ROM filesystem data UDF
filesystem data (unknown version, id 'NSR01') 'Ubuntu 8.04 i386
' (bootable)
qemu -kernel /boot/vmlinuz-2.6.26-rc5 -hda
ubuntu-8.04-desktop-i386.iso -append "root=/dev/hda console=ttyS0"
-nographic
And the result is:
[ 6.136373] Unable to load NLS charset utf8
[ 6.144019] VFS: Mounted root (iso9660 filesystem) readonly.
[ 6.144826] debug: unmapping init memory c0795000..c07d4000
[ 6.145575] Write protecting the kernel text: 2352k
[ 6.146417] Write protecting the kernel read-only data: 1068k
[ 6.147388] Warning: unable to open an initial console.
[ 6.148323] Kernel panic - not syncing: No init found. Try passing
init= option to kernel.
So what is the requirement for -hda then? 1. presence of
bootsector image 2. presence of /sbin/init???
Next I created the busybox rootfs image following this instruction:
http://dev.gentoo.org/~solar/busybox/bbemu
And run qemu as before, just substituting only the -hda option, it result in:
[ 5.564894] debug: unmapping init memory c0795000..c07d4000
[ 5.565539] Write protecting the kernel text: 2352k
[ 5.565891] Write protecting the kernel read-only data: 1068k
[ 5.656106] mount used greatest stack depth: 2240 bytes left
Bummer, could not run '/bin/sh': No such file or directory
Bummer, could not run '/bin/sh': No such file or directory
Bummer, could not run '/etc/init.d/rcS': No such file or directory
Bummer, could not run '/bin/sh': No such file or directory
Bummer, could not run '/bin/sh': No such file or directory
Bummer, could not run '/bin/sh': No such file or directory
Endless repetition here..
Why?
Why the difference? (ie, why can't I mount the latest kernel on the
debian image) How to resolve the error as shown above?
--
Regards,
Peter Teoh
next reply other threads:[~2008-06-12 17:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-12 17:14 Peter Teoh [this message]
2008-06-13 0:34 ` [Qemu-devel] Re: requirements of root filesystem image when passed to qemu Peter Teoh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=804dabb00806121014o3833c844l2ba7206cb17ed8dd@mail.gmail.com \
--to=htmldeveloper@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).