I found a thread from 2008.02 regarding this at
http://www.linuxquestions.org/questi...-image-618939/ but I will refrain from "necroposting".
When I attempt to follow the instructions:
==
# fdisk -l /media/disk/files.img
Note the device name, start and where it says "512 = n bytes".
If an ext3 partition is /media/disk/files.img2 starting at 660 with n = 8225280 you could 'losetup -o$[660*8225280] /dev/loop0 /media/disk/files.img' and then 'mount /dev/loop0 -t ext3 /mnt/somemountpoint'.
==
I run into some problems. Here's my output:
root@box:/var/misc# fdisk -l image.dd
You must set cylinders.
You can do this from the extra functions menu.
Disk image.dd: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
image.dd1 * 1 22 176683+ 83 Linux
image.dd2 2430 2491 498015 82 Linux swap
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(1023, 254, 63) logical=(2429, 0, 1)
Partition 2 has different physical/logical endings:
phys=(1023, 254, 63) logical=(2490, 254, 63)
image.dd3 23 2429 19334227+ 5 Extended
Partition 3 has different physical/logical endings:
phys=(1023, 254, 63) logical=(2428, 254, 63)
image.dd5 23 508 3903763+ 83 Linux
image.dd6 509 630 979933+ 83 Linux
image.dd7 631 752 979933+ 83 Linux
image.dd8 753 874 979933+ 83 Linux
image.dd9 875 2429 12490506 83 Linux
Partition table entries are not in disk order
root@box:/var/misc#
(I want to access image.dd6, which should be hda6)
root@box:/var/misc# losetup -o$[509*8225280] /dev/loop0 image.dd
root@box:/var/misc# mount /dev/loop0 -t ext2 /mnt2
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
From syslog:
Jul 30 15:21:30 box kernel: VFS: Can't find an ext2 filesystem on dev loop0.
On the running system from which this dd was made, I can verify it is ext2 using cfdisk:
cfdisk 2.12p
Disk Drive: /dev/hda
Size: 20491075584 bytes, 20.4 GB
Heads: 255 Sectors per Track: 63 Cylinders: 2491
Name Flags Part Type FS Type [Label] Size (MB)
------------------------------------------------------------------------
hda1 Boot Primary Linux ext3 180.96
hda5 Logical Linux ext2 3997.49
hda6 Logical Linux ext2 1003.49
hda7 Logical Linux ext2 1003.49
hda8 Logical Linux ext2 1003.49
hda9 Logical Linux ext2 12790.32
hda2 Primary Linux swap 509.97
#
Any help/ideas would be great.
Thanks!