WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Viewing the content of *.img file

To: Andrew Bobulsky <rulerof@xxxxxxxxx>
Subject: Re: [Xen-users] Viewing the content of *.img file
From: Flavio <fbcyborg@xxxxxxxxx>
Date: Sun, 23 Oct 2011 10:55:11 +0200
Cc: "<dftonywhite@xxxxxxxxxxx>" <dftonywhite@xxxxxxxxxxx>, Xen Users List <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 23 Oct 2011 01:56:54 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=l0CAKaBx9zgS1xhgqc66+nz6JbVsCKa/mX8QNJyTWn8=; b=QTC+1L7lX8+815csPZDRzU8oB+Fq/bz9Y4o1IN0mu19ekzwttBPnUcdBIWeyX+vvZ8 c/vkuk6duGdUADinI3LBRjt6AMwi/EL+Ja1Wlw/IRJmNJQjeF5h5cZiXvG2hvwI4oVZ1 1+74w/4mEzIHLVajyQshYcWSJQlF0rACs/hTc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <3585436799828045734@unknownmsgid>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <SNT127-W41B1685EC11A7B7693B0A9C9F30@xxxxxxx> <SNT114-W36540288EB73BD9361EFCBA6F30@xxxxxxx> <SNT127-W538511A75B7043F2D6D606C9EE0@xxxxxxx> <3585436799828045734@unknownmsgid>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On 23 October 2011 06:33, Andrew Bobulsky <rulerof@xxxxxxxxx> wrote:
> On Oct 23, 2011, at 12:06 AM, Scott Meyers <scottmeyers@xxxxxxxx> wrote:
>
> None of the suggestions worked. I really need help with this. Any body knows 
> how?
Hello,

maybe this is the same problem I bumped into few weeks ago.
If the img file contains only one partition, it is simple, because you
can mount the file
like the following: mount -o loop file.img /mnt/loop .
Stated that, the problem is when the img file contains more than one partition.
I've seen the partition table performing:
fdisk -l file.img

For example, my centos-5.0.img file:
# fdisk -l centos-5.0.img

Disk centos-5.0.img: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c0244

         Device Boot      Start         End      Blocks   Id  System
centos-5.0.img1   *          63      208844      104391   83  Linux
centos-5.0.img2          208845    16771859     8281507+  8e  Linux LVM

I can see there are two partitions.
To mount the first partition, you must consider the number 63.
63x512=32256
#mount -o loop,offset=32256 centos-5.0.img /mnt/loop/
# ls /mnt/loop/
config-2.6.18-274.7.1.el5xen      lost+found
System.map-2.6.18-274.el5xen   xen-syms-2.6.18-274.7.1.el5
config-2.6.18-274.el5xen          message
vmlinuz-2.6.18-274.7.1.el5xen  xen-syms-2.6.18-274.el5
grub                              symvers-2.6.18-274.7.1.el5xen.gz
vmlinuz-2.6.18-274.el5xen
initrd-2.6.18-274.7.1.el5xen.img  symvers-2.6.18-274.el5xen.gz
xen.gz-2.6.18-274.7.1.el5
initrd-2.6.18-274.el5xen.img      System.map-2.6.18-274.7.1.el5xen
xen.gz-2.6.18-274.el5

Further information at: http://wiki.edseek.com/guide:mount_loopback

As regard the LVM partition, I always get an error, but it is related
to another issue and
I haven't yet figured out hou to solve.
# mount -o loop,offset=106928640 centos-5.0.img /mnt/loop/
mount: unknown filesystem type 'LVM2_member'

Hope this helps.
--
Flavio

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>