From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6oe5-0001Nc-Eo for qemu-devel@nongnu.org; Thu, 12 Jun 2008 11:23:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6oe4-0001N4-MN for qemu-devel@nongnu.org; Thu, 12 Jun 2008 11:23:25 -0400 Received: from [199.232.76.173] (port=45695 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6oe4-0001Mu-DH for qemu-devel@nongnu.org; Thu, 12 Jun 2008 11:23:24 -0400 Received: from an-out-0708.google.com ([209.85.132.244]:8045) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K6oe4-0005Zg-33 for qemu-devel@nongnu.org; Thu, 12 Jun 2008 11:23:24 -0400 Received: by an-out-0708.google.com with SMTP id d18so1228049and.130 for ; Thu, 12 Jun 2008 08:23:23 -0700 (PDT) Message-ID: <804dabb00806120823s719632e4w28bb342870c92bd6@mail.gmail.com> Date: Thu, 12 Jun 2008 23:23:23 +0800 From: "Peter Teoh" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [Qemu-devel] QEMU running busybox + customized kernel Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I followed the following instruction: http://dev.gentoo.org/~solar/busybox/bbemu and my commandline is like: qemu -kernel /boot/vmlinuz-2.6.26-rc5 -append "console=ttyS0 root=/dev/hda init=/bin/sh rootfstype=ext3 ro" small_os_rootfs -initrd /boot/initrd-2.6.26-rc5-4.img -nographic I get the following trace: Loading scsi_mod.ko module [ 6.206933] SCSI subsystem initialized [ 6.210050] insmod used greatest stack depth: 2944 bytes left Loading sd_mod.ko module [ 6.238568] Driver 'sd' needs updating - please use bus_type methods Loading dock.ko module [ 6.260651] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread C71AD6A0 could not acquire Mutex [1] [20080321] [ 6.263898] No dock devices found. Loading libata.ko module Loading ata_piix.ko module Loading uhci-hcd.ko module [ 6.454178] USB Universal Host Controller Interface driver v3.0 Loading ohci-hcd.ko module Loading ehci-hcd.ko module Loading ahci.ko module Loading dm-mod.ko module [ 6.642118] device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel@redhat.com Loading dm-log.ko module Loading dm-mirror.ko module Loading dm-zero.ko module Loading dm-snapshot.ko module Making device-mapper control node Scanning logical volumes Reading all physical volumes. This may take a while... No volume groups found [ 6.852484] lvm used greatest stack depth: 2620 bytes left Activating logical volumes Volume group "clairevg" not found Creating root device. Mounting root filesystem. [ 7.106232] kjournald starting. Commit interval 5 seconds [ 7.106844] EXT3-fs: mounted filesystem with ordered data mode. Setting up other filesystems. Setting up new root fs no fstab.sys, mounting internal defaults setuproot: error mounting /sys: No such file or directory Switching to new root and running init. unmounting old /dev unmounting old /proc unmounting old /sys WARNING: can't access /bin/sh exec of init (/bin/sh) failed!!!: No such file or directory [ 7.147743] nash-hotplug used greatest stack depth: 2532 bytes left [ 7.149126] Kernel panic - not syncing: Attempted to kill init! The other errors except for the last one ("exec of init (/bin/sh) failed!!!: No such file or directory") I think can be ignored. So why /bin/sh failed? I changed the qemu commandline to (init=/bin/sh changed to init=/sbin/init): qemu -kernel /boot/vmlinuz-2.6.26-rc5 -append "console=ttyS0 root=/dev/hda init=/sbin/init rootfstype=ext3 ro" small_os_rootfs -initrd /boot/initrd-2.6.26-rc5-4.img -nographic [ 6.945974] lvm used greatest stack depth: 2620 bytes left Activating logical volumes Volume group "clairevg" not found Creating root device. Mounting root filesystem. [ 7.216936] kjournald starting. Commit interval 5 seconds [ 7.217605] EXT3-fs: mounted filesystem with ordered data mode. Setting up other filesystems. Setting up new root fs no fstab.sys, mounting internal defaults setuproot: error mounting /sys: No such file or directory Switching to new root and running init. unmounting old /dev unmounting old /proc unmounting old /sys [ 7.458915] 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 Notice the last line keep repeating.......why??? I am looking for a HOWTO on qemu running Busybox + customized kernel to test out the various kernel image. Anybody got any good suggestions? Thanks. -- Regards, Peter Teoh