[clug] mount partition from image file

Joel Plane joel.plane at gmail.com
Fri Apr 29 12:34:33 GMT 2005


Thanks Michael, that worked a treat.
Thanks also Francis and Tomasz

Joel.

Michael Cohen wrote:

>Hi Joel, 
>  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.
>  Then:
>
>  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.
>
>  Michael.
>
>On Fri, Apr 29, 2005 at 08:47:43PM +1000, Joel Plane wrote:
>  
>
>>Hiya.
>>
>>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?
>>
>>Thanks.
>>
>>Joel Plane
>>-- 
>>linux mailing list
>>linux at lists.samba.org
>>https://lists.samba.org/mailman/listinfo/linux
>>    
>>



More information about the linux mailing list