From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CqfF3-0006k1-M1 for qemu-devel@nongnu.org; Mon, 17 Jan 2005 17:21:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CqfEq-0006en-0Z for qemu-devel@nongnu.org; Mon, 17 Jan 2005 17:20:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CqfEp-0006Ze-QH for qemu-devel@nongnu.org; Mon, 17 Jan 2005 17:20:43 -0500 Received: from [216.198.101.68] (helo=trueband.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1Cqeum-0007WG-91 for qemu-devel@nongnu.org; Mon, 17 Jan 2005 17:00:00 -0500 Message-ID: <41EC355A.9090405@gsinet.net> Date: Mon, 17 Jan 2005 16:59:54 -0500 From: Tom Sandholm MIME-Version: 1.0 Subject: Re: [Qemu-devel] Mounting qemu virtual disk images from host linux os References: <41EAF9E2.9030108@gsinet.net> <41EB1A04.4060605@gsinet.net> <200501170331.22395.maw48@cl.cam.ac.uk> <20050117152615.GB5897@jbrown.mylinuxbox.org> In-Reply-To: <20050117152615.GB5897@jbrown.mylinuxbox.org> Content-Type: multipart/mixed; boundary="------------080505050406020108030600" 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 This is a multi-part message in MIME format. --------------080505050406020108030600 Content-Type: multipart/alternative; boundary="------------050501020403070300070001" --------------050501020403070300070001 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Thanks for all the replies. The image was created with qemu-img, with a size of 4GB. I am able to fdisk image-name and see the partitions. (as follows) Just can't mount partition 1. ==================================== nixsys:/qemu# fdisk debian01_sarge_hda.img The number of cylinders for this disk is set to 8322. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk debian01_sarge_hda.img: 4294 MB, 4294967296 bytes 16 heads, 63 sectors/track, 8322 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Device Boot Start End Blocks Id System debian01_sarge_hda.img1 * 1 7904 3983584+ 83 Linux debian01_sarge_hda.img2 7905 8322 210672 f W95 Ext'd (LBA) debian01_sarge_hda.img5 7905 8322 210640+ 82 Linux swap Command (m for help): ======================================== Thanks! Tom Sandholm. Jim C. Brown wrote: >On Mon, Jan 17, 2005 at 03:31:22AM +0000, Mark Williamson wrote: > > >>I've not used lomount before so maybe you can pass flags to lomount directly. >>I can tell you how to do it using losetup / mount separately: >> >>You can use losetup to bind a partition of the disk file to a /dev/loop device >>and then mount that. Use the -o option to specify the offset into the file >>where the partition is to be found. Use the -s option to specify the size of >>the partition. >> >>You can probably fdisk the file (or, if that doesn't work, a loop device bound >>to the whole file) to figure out where the partition boundaries are. >> >>HTH, >>Mark >> >> > >lomount does all of this internally. You can't pass it an offset into the file, >only which partition you wish to mount. It calculates the offset by looking it >up in the partition table. > >I'm wondering if he is trying to mount a COW image or some fancy-but-qemu-supported >disk image. lomount has only been tested with raw images and sparse images, and >is unlikely to work w/ anything else. > > > --------------050501020403070300070001 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi,
  Thanks for all the replies. 
The image was created with qemu-img, with a size of 4GB.
I am able to fdisk image-name and see the partitions. (as follows)
Just can't mount partition 1.
====================================
nixsys:/qemu# fdisk debian01_sarge_hda.img

The number of cylinders for this disk is set to 8322.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk debian01_sarge_hda.img: 4294 MB, 4294967296 bytes
16 heads, 63 sectors/track, 8322 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

                 Device Boot      Start         End      Blocks   Id  System
debian01_sarge_hda.img1   *           1        7904     3983584+  83  Linux
debian01_sarge_hda.img2            7905        8322      210672    f  W95 Ext'd (LBA)
debian01_sarge_hda.img5            7905        8322      210640+  82  Linux swap

Command (m for help):
========================================

Thanks!
Tom Sandholm.




Jim C. Brown wrote:
On Mon, Jan 17, 2005 at 03:31:22AM +0000, Mark Williamson wrote:
  
I've not used lomount before so maybe you can pass flags to lomount directly.
I can tell you how to do it using losetup / mount separately:

You can use losetup to bind a partition of the disk file to a /dev/loop device
and then mount that.  Use the -o option to specify the offset into the file
where the partition is to be found.  Use the -s option to specify the size of
the partition.

You can probably fdisk the file (or, if that doesn't work, a loop device bound
to the whole file) to figure out where the partition boundaries are.

HTH,
Mark
    

lomount does all of this internally. You can't pass it an offset into the file,
only which partition you wish to mount. It calculates the offset by looking it
up in the partition table.

I'm wondering if he is trying to mount a COW image or some fancy-but-qemu-supported
disk image. lomount has only been tested with raw images and sparse images, and
is unlikely to work w/ anything else.

  
--------------050501020403070300070001-- --------------080505050406020108030600 Content-Type: text/x-vcard; charset=utf-8; name="sandholm.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sandholm.vcf" begin:vcard fn:Tom Sandholm n:Sandholm;Tom email;internet:sandholm@gsinet.net version:2.1 end:vcard --------------080505050406020108030600--