Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
# 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
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?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.