user.p0d.org

bits release in progress

Mount filesystem

Tags shell

Mount an image file containing partitions

First, get informations about your image file:

# fdisk -lu image.img
Disk image.img: 268.4 GB, 268435456000 bytes
107 heads, 47 sectors/track, 104252 cylinders, total 524288000 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: 0x82237af4

                 Device Boot      Start         End      Blocks   Id  System
image.img1                         2048   524287999   262142976   83  Linux

Then mount the partition specifying the offset (start position * sector size):

# mount -o loop,ro,offset=$(( 2048 * 512 )) image.img /mnt