LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   mounting a dd image file? (http://www.linuxquestions.org/questions/linux-general-1/mounting-a-dd-image-file-95579/)

bfay 09-22-2003 02:01 PM

mounting a dd image file?
 
My brother got a problem with his harddisk on a win98 machine.
The primary partition is unusable and his data is in a single extended partition.

He now needs to recover his data. I did a dd image of the extended partition.

Is it possible to mount a dd image to extract the data?

Thanks,
Bern

Mara 09-22-2003 02:04 PM

Yes. Mount it as any other device, just use -o loop option. Example:
mount -t ext2 /image.img /mnt/image -o loop

Thymox 09-22-2003 06:10 PM

If you read around on the man page for mount, it'll tell you all about loop mounting filesystems. In the above example, Mara has given another option too -t ext2. This would mount a Linux filesystem as a loop device - you will (more than likely) need to use -t vfat.

Good luck.

Mara 09-23-2003 05:51 AM

Quote:

Originally posted by Thymox
If you read around on the man page for mount, it'll tell you all about loop mounting filesystems. In the above example, Mara has given another option too -t ext2. This would mount a Linux filesystem as a loop device - you will (more than likely) need to use -t vfat.

Good luck.

Right...Or even maybe
mount /image.img /mnt/image -o loop
When -t is not specified, it tries to detect the filesystem. It usually works.
I'm a totally Linux person, so when bfay mentioned 'extended partition', my only idea was that it means ext2. :)

cr41g14 01-13-2011 02:35 PM

read the image
 
Hi i know this thread is dates, but i was wondering is it possible to programmatically read through the files of this image without mounting to compare file extensions on the drive. If mounting is required is it possible to again look through the image for known file extensions, e.g PSEUDO:

Loop-retrieve file extension for file #1{

if file extension == JPG{
message == contains jpg

else
{
}

sorry for the weird coding, just want to know if its possible and some direction would be great, thank you

16pide 01-14-2011 08:44 AM

try file your-dd-file.dd to get infos on your dd file:
mine says:
FEDORA-sdb1-3.dd: x86 boot sector, code offset 0x58, OEM-ID " mkdosfs", sectors/cluster 8, Media descriptor 0xf8, heads 124, sectors 7680250 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 7486, serial number 0x79be2dc5, label: "FEDORA "

and I mount it with:
mount FEDORA-sdb1-3.dd /mnt/tmp -o loop

Now if you want to find jpeg files in it, you would then do:
find /mnt/tmp -name "*.jpg" -print

I can think of no meaningful ways of doing this without actually mounting the filesystem


All times are GMT -5. The time now is 02:04 PM.