-   Linux - Newbie (
-   -   .dd File Type Questions (

superzork 09-20-2012 07:16 PM

.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!

unSpawn 09-20-2012 08:02 PM


# 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

superzork 09-20-2012 10:01 PM

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


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


sudo dmsetup status


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?

unSpawn 09-21-2012 06:02 AM


Originally Posted by superzork (Post 4785533)
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...


# 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

All times are GMT -5. The time now is 11:36 AM.