[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Mounting a disk image under Linux
From: |
Jim C. Brown |
Subject: |
Re: [Qemu-devel] Mounting a disk image under Linux |
Date: |
Sat, 19 Jun 2004 13:31:11 -0400 |
User-agent: |
Mutt/1.4i |
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
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
- Re: [Qemu-devel] Useful Q&A, (continued)
- Re: [Qemu-devel] Useful Q&A, Fabrice Bellard, 2004/06/16
- [Qemu-devel] Mounting a disk image under Linux, Benjamin Brown, 2004/06/19
- Re: [Qemu-devel] Mounting a disk image under Linux, Grzegorz Kulewski, 2004/06/19
- Re: [Qemu-devel] Mounting a disk image under Linux, Gianni Tedesco, 2004/06/19
- Re: [Qemu-devel] Mounting a disk image under Linux, Benjamin Brown, 2004/06/19
- Re: [Qemu-devel] Mounting a disk image under Linux,
Jim C. Brown <=
- Re: [Qemu-devel] Mounting a disk image under Linux, Gianni Tedesco, 2004/06/19
- Re: [Qemu-devel] Mounting a disk image under Linux, Jim C. Brown, 2004/06/20
- Re: Re: [Qemu-devel] Mounting a disk image under Linux, Mulyadi Santosa, 2004/06/20