How to (auto?)mount a disk image file
Christian Jaeger
chrjae at gmail.com
Wed Aug 20 12:50:40 UTC 2014
2014-08-20 12:41 GMT+01:00 Tom H <tomh0665 at gmail.com>:
> create a ".desktop" file
Yes, that may be a good improvement.
(I guess I could also add a udev hook script for the USB device that
auto-mounts it when he attaches the drive holding the host filesystem.
(Hm better: hook that's called when the host image is mounted; not
sure this is possible in udev?))
That leaves me with the question on how to mount it in a familiar way,
i.e. under /mount and so that he can click the unmount icon; I could
write a script to get the uuid from the partitions and create
directories and mount them there (with -o users? never used this
outside of /etc/fstab), but am not sure this will do everything
necessary. Is the code in Ubuntu that mounts things there available
from scripts?--Also, why does Ubuntu not auto-mount the backup
partitions once they become available after running kpartx? Can I
change that? Ok special requirement: mount them read-only.
Thing is that even if I make it simple for him, if it takes time for
*me* to do it, since he's paying for it with money the total effort is
still high. Also, I think a deeper issue is that this kind of
solution, while relatively straightforward to implement for someone
like me who knows his way around the command line, always remains a
hack; it doesn't really solve a shortcoming of Ubuntu in the sense
that Ubuntu would add this as a patch or as a new package and thus
make it available to other people or even to the client himself on
future/other installations. This makes it bad solutions as it doesn't
solve the problem permanently for him. The right solution would make
double-clicking on the image file from the file manager (or selecting
some "mount with" from context menu) work. Plus points if it's mostly
independent of the file manager used (or at least easily portable). Is
this feasible for a programmer in a couple hours? Starting points?
Official recommendations?
Christian.
More information about the ubuntu-users
mailing list