LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-20-2012, 07:16 PM   #1
superzork
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
.dd File Type Questions


Hello everyone, I have been doing research for a while and really haven't found exactly what I need so I am asking here hoping that you can help! I hope this is the right section to post in as it seems the most fitting, I am a linux newbie. So, I have a .dd file that I need to open and see the files inside. I have been researching the mount function for the last hour and I simply cannot get it to work. Basically what I am asking is how can I get to see the files in the .dd file? I would like you to be specific in your answer because clearly general answers are not working. Also, if there is a better way than the mount method, I am open to suggestions I just need to get this stupid thing open.

Thank you in advance!
 
Old 09-20-2012, 08:02 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,990
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
Code:
# Find an unused loop device:
sudo losetup -f 
# Mount the image (example):
sudo losetup /dev/loop3 /path/to/image.dd
# Inspect what you've got (whole disk, partition, ISO, etc, etc):
sudo fdisk -l /dev/loop3
# Mount partitions automagically:
sudo kpartx -va /dev/loop3
# See where they're at:
sudo dmsetup status
# Now you can mount any partition and with any options as you would usually (ext3 example):
sudo mkdir /mnt/temp
sudo mount /dev/mapper/loop3p1 -t ext2 -o ro,norecovery,noload /mnt/temp
 
Old 09-20-2012, 10:01 PM   #3
superzork
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Response to Code

Ok, so I did what you said and had a couple of problems with the code. For some reason:

sudo fdisk -l /dev/loop1

Returns:

Disk /dev/loop1: 536 MB, 536870912 bytes
255 heads, 63 sectors/track, 65 cylinders, total 1048576 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/loop1 doesn't contain a valid partition table

Also:

sudo dmsetup status

Returns:

No devices found

So yeah, something is going wrong here, but I'm not sure what. The problem may be that this is a weird .dd file, as it is of a SheevaPlug, not exactly a standard computer. Do you have any more suggestions?
 
Old 09-21-2012, 06:02 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,990
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
Quote:
Originally Posted by superzork View Post
The problem may be that this is a weird .dd file, as it is of a SheevaPlug, not exactly a standard computer.
Funny how people always seem to post pertinent information after their first post...

Code:
# If you have disktype check the file system type:
disktype /dev/loop1
# or tune2fs if you suspect it's ext.* 
# .. or testdisk:
testdisk /list /dev/loop1
# else just try and mount it anyway:
mount /dev/loop1 -t auto /some/mount_point
# If this doesn't work you'll have to calculate the offset MBR/PT-wise
umount /some/mount_point; losetup -d /dev/loop1
# Get the start sector value for the partition:
fdisk -lu /path/to/image.dd
# and enter it as OFFSET value:
losetup -o $[512*$OFFSET] /dev/loop1 /path/to/image.dd
# ..or if your version of mount supports loop mounting directly:
mount -o loop,offset=$[512*$OFFSET] /dev/loop1 /path/to/image.dd
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Content-type/Mime type of the file using shellscript swathikumar Linux - Newbie 9 05-24-2011 11:48 PM
changing file system type to another filesystem type,does it effect on data? janakiramulu Ubuntu 1 02-04-2011 01:58 AM
Filesystem type questions computergeek7 Linux - General 6 04-22-2010 12:20 PM
Filesystem type questions computergeek7 General 2 04-22-2010 11:19 AM
Get file icon from extension, file type, or mime-type Guitarist88 Programming 3 04-21-2008 10:58 AM


All times are GMT -5. The time now is 04:41 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