Mount raw dd images using GUI/Nautilus the same way as an ISO file (double-click, no sudo, eject button, etc)

13,736

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:
13,736

Related videos on Youtube

MestreLion
Author by

MestreLion

Check out my projects at github: https://github.com/MestreLion Or my (somewhat defunct) profile at Launchpad https://launchpad.net/~mestrelion

Updated on September 18, 2022

Comments

  • MestreLion
    MestreLion almost 2 years

    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?

    • Alex Stevens
      Alex Stevens about 13 years
      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?
    • MestreLion
      MestreLion about 13 years
      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).
    • Alex Stevens
      Alex Stevens about 13 years
      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.
    • MestreLion
      MestreLion about 13 years
      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.
    • sudodus
      sudodus about 6 years
      kpartx can manage image files with multiple partitions (filesystems).
  • MestreLion
    MestreLion about 13 years
    +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
    MestreLion about 13 years
    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
    MestreLion about 13 years
    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)
  • Alex Stevens
    Alex Stevens about 13 years
    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?
  • MestreLion
    MestreLion about 13 years
    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.
  • Alex Stevens
    Alex Stevens about 13 years
    It's based on a new library called GVFS (Gnome Virtual Filesystem), and currently the old library - FUSE - is apparently being deprecated. So from what I could see in the Software Center (deducing this, no real documentation, only the short description) is that the binary "gvfs-fuse" is supposed to pass the mounted images to FUSE, but I don't think it reciprocates at all... From a Fedora wiki, apparently this is the GVFS/GIO Documentation developer.gnome.org/gio/unstable