I have tried this solution on Ubuntu 10.04. ttylinux.img is extracted from http://dev.opennebula.org/attachments/download/170/ttylinux.tar.gz.
$sudo fdisk -lu ttylinux.img
You must set cylinders.
You
can do this from the extra
functions menu.
Disk ttylinux.img: 0 MB, 0 bytes
16 heads, 63 sectors/track, 0 cylinders, total 0 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: 0x0cbd62fa
Device Boot Start End Blocks Id System
ttylinux.img1 63 81647 40792+ 83 Linux
$sudo mount -o loop,offset=32256 ttylinux.img /mnt
offset is 63 * 512. It must be specified. Otherwise, mount complains:
mount: you must specify the
filesystem type
Refer: http://timesinker.b
logspot.com/2009/04/mounting-xen-xm-xmfile-disk-image-file.html, http://linuxwave.blogspot.com/2008/02/accessing-data-on-xen-lvm-guest-image.html