From: "Jim C. Brown" <jbrown106@phreaker.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Mounting a disk image under Linux
Date: Sat, 19 Jun 2004 13:31:11 -0400 [thread overview]
Message-ID: <20040619173111.GB11948@jbrown.mylinuxbox.org> (raw)
In-Reply-To: <40D46B1B.9070704@silentsoftware.co.uk>
On Sat, Jun 19, 2004 at 05:34:35PM +0100, Benjamin Brown wrote:
> I created a disk image under (host) Linux using dd and fdisked and
> formatted using a (guest)Windows 98 boot disk under QEMU.
> I then tried to mount this under linux to add files to it using:
>
> mount -o loop /opt/qemu/tempImage /mnt/tempImage
>
> This failed and asked me for the filesystem type so I specified:
>
> mount -o loop -t vfat /opt/qemu/tempImage /mnt/tempImage
>
> This also failed with the error:
>
> mount: wrong fs type, bad option, bad superblock on /dev/loop1,
> or too many mounted file systems
> (could this be the IDE device where you in fact use
> ide-scsi so that sr0 or sda or so is needed?)
>
> Any ideas why this happens - this should just a straight fat formatted
> disk image?
>
>
No its not. There is a partition table in it.
The quick and dirty way is to use this mount command:
mount -oloop,offset=sector_size*partition_start -t vfat /opt/qemu/tempImage /mnt/tempImage
sector_size is usually 512 and parition_start is usually 63. You can run
fdisk -lu /opt/qemu/tempImage
to be sure. I'm working on a wrapper called lomount that does this for you.
Basicly you call it like this:
lomount -t vfat -diskimage /opt/qemu/tempImage -partition 1 /mnt/tempImage
It works great but has a bug if you try to mount a partition which doesnt
exist.
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
next prev parent reply other threads:[~2004-06-19 19:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-16 14:42 [Qemu-devel] some help Ludovic Gele
2004-06-16 19:13 ` [Qemu-devel] Can't see network under qemu 0.5.5 Leonard T. Erwine
2004-06-17 8:22 ` Ludovic Gele
2004-06-17 15:39 ` Marc Vertes
2004-06-18 20:58 ` Leonard T. Erwine
2004-06-18 20:34 ` Leonard T. Erwine
2004-06-16 20:26 ` [Qemu-devel] Useful Q&A Benjamin Brown
2004-06-16 20:35 ` Bartosz Fabianowski
2004-06-17 10:42 ` Antony T Curtis
2004-06-16 21:02 ` Fabrice Bellard
2004-06-16 21:16 ` malc
2004-06-16 21:41 ` Benjamin Brown
2004-06-17 8:25 ` Johannes Schindelin
2004-06-19 17:35 ` Benjamin Brown
2004-06-19 16:34 ` [Qemu-devel] Mounting a disk image under Linux Benjamin Brown
2004-06-19 16:39 ` Grzegorz Kulewski
2004-06-19 16:40 ` Gianni Tedesco
2004-06-19 17:16 ` Benjamin Brown
2004-06-19 17:31 ` Jim C. Brown [this message]
2004-06-19 20:00 ` Gianni Tedesco
2004-06-19 23:48 ` Jim C. Brown
2004-06-20 8:20 ` Mulyadi Santosa
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=20040619173111.GB11948@jbrown.mylinuxbox.org \
--to=jbrown106@phreaker.net \
--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).