Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have some raw partition images created using dd this way:

dd if=/dev/sdXY of=/path/file.img

I know I can mount them using:

sudo mkdir /media/mountpoint
sudo mount -o loop /path/file.img /media/mountpoint

But... is there any easier way? I would like to have the same functionaly and ease-of-use as Nautilus handles .ISO CD/DVD images, which is:

  • Double click to mount
  • It shows up in Desktop and in Nautilus left panel
  • Auto-detects filesystem (as mount does)
  • No need of sudo or administrator privileges
  • No need to pre-create a mountpoint folder (or to delete it afterwards)
  • Handy "Eject" button to unmount

Ive tried renaming the images as .IMG, .BIN, .ISO, with no sucess. Also tried configuring Opwn With > Archive Mounter, and it didnt work.

How can I do that?

share|improve this question
    
I'm assuming the partition that you're dd'ing from, is an installation of an operating system, or at least a partition with NTFS/EXT3/EXT4/etc filesystems? –  Alex Stevens Jun 15 '11 at 23:25
    
Yes. Some are FAT, some NTFS, some EXT2/3/4. I've tested them all with mount -o loop and they all worked. Filesystem was auto-detected perfectly (didnt have to use the -t parameter for any). –  MestreLion Jun 15 '11 at 23:35
    
K k, added in an answer below... Be warned though, I'm not sure how the script will react to mounting multiple filesystems from the one image. –  Alex Stevens Jun 15 '11 at 23:54
    
Multiple filesystems are not a concern. Each file was taken from a single partition. If this can be done with an .ISO file, and can also be done with a NTFS/EXT2/3/4 HDD/USB partition, there must be a way to do so with a file image of that partition. –  MestreLion Jun 16 '11 at 12:50

1 Answer 1

up vote 2 down vote accepted

Main Answer

There should be the Archive Mounter option. Just right click the image and click "Archive Mounter", this should mount most disk based file systems like ISO 9660 (to left pane of Nautilus and on the Desktop) - however, it mounts images to:

~/.gvfs

Alternative Answer

There's an extremely useful script that has been created, called nautilus-mount-image which should mount most filesystems.

This can be downloaded from here.

This is from Raúl González Duque's PPA; looking at the code, it essentially figures out what type of filesystem the Image has, and attempts to mount it. It supports:

  • ISO 9660 (CD's, DVD's, etc), NTFS, EXT2/3/4, HFS, ReiserFS
  • And many more...

For general use, you can use this script by right clicking the file that you want to mount, and clicking "Mount image..." like so:

Pulled from Raúl's website mundogeek.net

To answer your requests:

  • You won't be able to double click to mount
  • It should show up on the desktop and the left panel of nautilus
  • Auto-detects Filesystem
  • Does need user priviledges
  • Automatically mounts to folder under /media/ (so don't need to make mount point folder)
  • Eject button located in Nautilus or by right clicking original file and selecting Unmount.

Unfortunately, I don't know how this script will react to Images with multiple filesystems. Kittens may burn. You've been warned ;)

Reference:

Nautilus Scripts

share|improve this answer
    
+1 for that partial solution, thanks! Its a nice script, Ive tested here. The problem is it uses mkdir/mount/rm, so it does need admin privileges. Im looking for a solution that handles dd images just like iso images.. no password, double-click, etc. –  MestreLion Jun 16 '11 at 2:38
    
The "Archive Mounter" does not work for me, as I've already said in the question. It mountes in left panel, but content is empty. Does it require a certain extension (img, bin?) for it to work? Using the same image with mount does work –  MestreLion Jun 16 '11 at 2:47
    
Also, where it mounts is irrelevant... i dont care if it is ~/gvfs or /media, as long as it does the job with a double click and dont require password (just like it is with ISO file) –  MestreLion Jun 16 '11 at 2:48
    
Ah k, yeah, I noticed that about the script, it's nice, but not exactly what you want. Archive Mounter so far, I'm pretty sure only handles CD Images (like UDF and ISO 9660); although, I'm not sure why it wouldn't load EXT4/3/2 etc, can't see why it shouldn't :/ Maybe there's a GVFS module out there that allows it to mount extra types? –  Alex Stevens Jun 16 '11 at 11:38
1  
Is there any documentation on Archive Mounter to check which formats it supports? I can rename the image to anything (.IMG, .BIN, .Whatever) if thats needed for it to work. If, instead of a file, it is a partition, it works. So I assume there must be a way to do the same with a dd image of the same partition. –  MestreLion Jun 16 '11 at 12:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.