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
|