[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] QEMU using fuse-ext2

From: Peter Maydell
Subject: Re: [Qemu-discuss] QEMU using fuse-ext2
Date: Sat, 29 Nov 2014 11:48:11 +0000

On 29 November 2014 at 11:31, Jones Smith <address@hidden> wrote:
> I am using QEMU from MacOSX, and I would like to emulate an arm system
> directly from my SD card (which I can do from Arch Linux).
> Actually, I can emulate the image of my SD card successfully (i.e. the *.img
> file that I flashed on the SD card), but the partitions are not detected as
> soon as I try to emulate the SD card directly. I am trying the following
> command:
> $ qemu-system-arm -kernel path/to/kernel-qemu -cpu arm1176 -m 256 -M
> versatilepb -no-reboot -serial stdio -append "console=ttyAMA0 root=/dev/sda5
> rootfstype=fuse-ext2 rw" -hda/dev/disk2
> With fuse-ext2 being the third-party command that I use on MacOSX to mount
> an Ext filesystem.

The "-append" command line option is to pass command line (kernel)
arguments to the *guest* OS. Your guest here is Linux, so it doesn't
understand what "fuse-ext2" means; it's probably just ignoring that
part of the command line.

> QEMU gives me the following output:
> VFS: Cannot open root device "sda5" or unknown-block(8,5): error -6
> Please append a correct "root=" boot option; here are the available
> partitions:
> 0b00         1048575 sr0  driver: sr
> 1f00           65536 mtdblock0  (driver?)
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(8,5)
> CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.26+ #2

This is your guest kernel complaining that it can't find the disk
you asked it to provide. There might be further clues to why this
earlier in the boot log, where the guest attempts to probe for
disks and (presumably) doesn't find them.

> Is it because QEMU cannot use my "fuse-ext2" third-party to mount ext4? What
> could I try to do to make it recognize the filesystems on my SD card?

QEMU's code for directly using block devices will have been written
for and tested on Linux. I don't know if anybody's ever tried it
for MacOSX -- in general any host OS other than Linux gets much
less testing and developer attention, so (especially with obscure
features like direct access to host block devices) bugs or broken
features are more likely.

I think "fuse-ext2" here is not relevant -- QEMU will attempt to
read disks or disk images as a raw bag of bytes. The filesystem
support for interpreting those bytes as ext4 (or FAT, or NTFS, etc)
is in the guest OS, not in QEMU. Since "fuse-ext2" is for host
OS programs, it's not going to be required. (If you have your
system set up so that fuse-ext2 is trying to access the /dev/disk2
partition at the same time as you're running QEMU then the two
are going to conflict and you're going to get failure to access
the device at best, and corrupted data at worst, so don't do that.)

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]