How to (auto?)mount a disk image file

Christian Jaeger chrjae at gmail.com
Mon Aug 18 19:10:14 UTC 2014


Hi

I've got 16 years of full-time Linux experience as a developer, and at
times the difference between that and someone you're trying to help
who doesn't understand the shell is difficult to bridge.

So at one point I made a backup of one of his disks, using ddrescue.
Now he needed access to that backup. It includes multiple partitions
in the single file. I know I can mount it with kpartx and mount, and
have made a script doing that. But even asking him to open a Howto
document that tells him to open a Terminal and enter "sudo
/opt/local/sbin/mount-backup" is making him thow up his hands about
how complicated this is. And I guess the customer is always right.
Perhaps people are not made for the command line even if they try to?
(To be fair, perhaps he was throwing up his hands mostly for the time
it took me to write the script and the howto? I had to go through "oh,
losetup won't open up the partitions on this Ubuntu installation (I'm
using Debian+customizations myself), yeah right this needs some module
option; oh hey where is the 'loop' module what the hell, none loaded
and none around, huh, I don't understand? Ok so there was this
alternative, what was it called, google for it, ah kpartx. Ok, let's
write a script, oh, no emacs on this machine, no vim, just bare vi
(grinding teeth). Done." Compared with double clicking of course that
was a lot. Also, showing up the mounted partitions in the file browser
just like those under /media would be real nice, of course, I don't
know how to do that. Anyone does?)

Now, I can't check whether the default file manager on Ubuntu would
actually open this image by double clicking. Would it? I can't test,
as I hid that image in a place that only root has access to, and
already closed the terminal session, and didn't want to bother him
with another one. I'm sure you'll tell me if what I did above was
unnecessary, but I didn't expect the file manager to be able to
recognize this image as a full disk image and know what to do with it,
including asking for admin permissions.

In case it doesn't do that, then, how would you suggest that I teach
Ubuntu to open that image (mount all partitions inside) in a
double-click action?

Thanks,
Christian.




More information about the ubuntu-users mailing list