LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-22-2003, 02:01 PM   #1
bfay
LQ Newbie
 
Registered: Sep 2003
Location: Quebec, Canada
Distribution: Debian
Posts: 21

Rep: Reputation: 15
Question 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
 
Old 09-22-2003, 02:04 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
Yes. Mount it as any other device, just use -o loop option. Example:
mount -t ext2 /image.img /mnt/image -o loop
 
Old 09-22-2003, 06:10 PM   #3
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
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.
 
Old 09-23-2003, 05:51 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,536

Rep: Reputation: 148Reputation: 148
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.
 
Old 01-13-2011, 02:35 PM   #5
cr41g14
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
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
 
Old 01-14-2011, 08:44 AM   #6
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting image file manicman Linux - Newbie 3 11-25-2005 04:36 AM
mounting ISO image satimis Linux From Scratch 12 10-22-2005 07:15 PM
Mounting iso image batev Slackware 11 10-20-2005 09:24 AM
Mounting an ISO image from a CD different than mounting from HD? NoTiG Linux - Software 4 08-03-2005 04:40 PM
image file mounting cchanana Linux - Newbie 9 01-26-2005 06:24 AM


All times are GMT -5. The time now is 12:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration