[clug] mount partition from image file
michael.cohen at netspeed.com.au
Fri Apr 29 11:13:17 GMT 2005
You need to work out where in the disk image the partition starts:
sfdisk -l -uS image_file.dd
The offset is given in sectors (512 bytes), so multiply that by 512
and you have the offset in bytes.
mount -oloop,offset=xxxx image.dd /mnt/point
This will work if the offset is less than 2G, other wise you can look
for the NASA loopback driver which supports large offsets.
On Fri, Apr 29, 2005 at 08:47:43PM +1000, Joel Plane wrote:
> I am attempting to recover data from a corrupt filesystem on an old HDD.
> I used
> dd if=/dev/sda of=/data/image.img
> to copy the entire hdd to an image file
> Is there a way I can then mount one partition from the image?
> Alternatively I could use dd if=/dev/sda3 of=.... to just get an image
> of the partition I want. the just use mount /data/image.img /mnt/image
> -o loop
> But since I've already imaged the entire disk, does anyone know how to
> mount a partition from this image?
> Joel Plane
> linux mailing list
> linux at lists.samba.org
More information about the linux