2

I've created an .img file using ddrescue. I am a complete Ubuntu Noob, and having lots of issues mounting my img file so I can get data off of it.

If I try this command:

sudo mount -o loop,ro partition.img mountpoint

I get an error as follows:

wrong fs type, bad option, bad superblock on /dev/loop8, missing codepage or helper program, or other error

running it through parted, I've found that the file system is ext4. So I tried the command:

sudo mount -t ext4 -o loop,ro partition.img mountpoint

and I get the same error.

I know that I only copied one partition with ddrescue (not the entire drive).

The partition.img file is 49.8GB. The drive that has the file on it is 80GB. I'm trying to mount it to a folder called 'mountpoint' which exists on the same physical drive as my .img file, which I don't know if that's O.K. or not. Do I need 49.8GB of free space to mount an img file that is 49.8GB?

I've run fdisk on the .img file, and although I don't really know what I'm looking at, it seems to run just fine, which implies to me that the .img file is not corrupted.

Anyway, I'm really looking for some help here! What am I missing? Why can't I mount this .img file?

And just to help my case that the .img file is actually only one partition when I run parted I get this output:

Number Start End Size File System Flags

1 0B 49781997567B 49781997568B ext4

Trevzilla
  • 21
  • 3
  • 5
  • Not sure if you can mount an image in a folder within the same partition. I always use */mnt* for that purpose or a subfolder within it. Assuming the img file is in your *user/home* partition try `sudo mount -o loop partition.img /mnt`. – Paul Benson Jan 17 '19 at 07:22
  • Still no luck. I'm happy to move my image file to the user/home partition and try from there, but don't really know how to do that. (I'm running Ubuntu Live off of a thumbdrive) The Image file is in the root directory of an extra harddrive connected to my computer. How do I move it over to my user/home partition? – Trevzilla Jan 17 '19 at 21:35
  • You don't have to move the iso to your home drive. I just assumed it was there. The easiest way to mount the iso without involving mount commands is to use `Disk Image Mounter` which comes with Ubuntu. You'll see it under /usr/share/applications. First, you need to mount your external HDD. If it isn't on your desktop, click on File Manager and you should see it listed in the sidebar. Click on it and find the iso, then come back. – Paul Benson Jan 18 '19 at 00:25
  • Thanks so much for your help and patience! I wasn't able to find Disk Image Mounter in applications, however I was able to mount my external hard drive and navigate to the .img file using the file explorer. (It's an .img file, not an .iso. Don't know if that makes a difference) Anyway, I right clicked on the .img file, and selected open with another application. I found Disk Image Mounter in the application list, so I selected it and hit 'Select.' As soon as I did that an error popped up. 'Ubuntu 18.04 has experienced an internal error.' Shortly after the computer froze entirely. – Trevzilla Jan 18 '19 at 05:10
  • It seems that DIM is happy to mount iso files, but doesn't work for img files. But on trying the latter my PC did not freeze nor even give an error. Just nothing happened. The internal error suggests to me that you have a corrupted system. If you can't see DIM in the applications folder it tends to suggest this too. I'd start over and do a re-install of 18.04. When you did the original install did you download the Ubuntu iso from their site? – Paul Benson Jan 18 '19 at 16:08
  • Ah, maybe that's the issue. I'm just trying to do all this from an Ubuntu Live thumbdrive. I'll admit windows10 is my normal OS, but windows seems to be able to do absolutely nothing when it comes to recovering hard drives. (especially when the hard drive in question was on a linux machine). Do you think it necessary to do a full Ubuntu install? Maybe I can find myself a computer I wouldn't mind doing that on. – Trevzilla Jan 19 '19 at 05:39

0 Answers0