18

I need automount for internal and external storages. On boot and on connect. For now I have to click in file manager to make it accessible which is weird for 2016! I know that only udev can be involved in it. But cant find a way for modern ubuntu, all tutorials bit out of date(used HAL and so on). I don't want use fstab also. P.S. This should work without any 'heads' like KDE, Unity, Gnome. Just from runlevel 3 and so on. Minimum requirements. (no automount daemon).

22

You can do this in the Disks application, it is preinstalled, search in the dash and open it.

Now click the partition on the left and under the diagram in the center click the little cog icon enter image description here

Now choose edit mount options and make the settings, Automatic mount > off, Mount at startup > on, Show in interface > on and Require additional authorization to mount > off.

enter image description here

This will mount the partition as your user at boot and show it in the launcher, you can also change the name and stuff here too.

As requested by OP here is a way to do this via terminal

First we need the UUID of the disk to be mounted, find it with

blkid /dev/sdX

Replace the X with the correct ID of course, the UUID looks like this

40e554eb-6421-4813-88ea-3882a3a7a153

Now open this file

sudo nano /etc/fstab

Now add this line to the end

UUID=40e554eb-6421-4813-88ea-3882a3a7a153 /mnt/Disk auto nosuid,nodev,nofail,x-gvfs-show 0 0

Change the UUID for yours and /mnt/Disk should be changed to where you want to mount the disk and save the file.

  • 1
    No in headless run it don't. So this is no solution at all. – Maximus Jun 5 '16 at 10:56
  • 5
    Where does it say that in you question? It does not, update your question with exactly what you need. Also how do you "click file manger" in a headless? Your question heavily imply you have a GUI. – Mark Kirby Jun 5 '16 at 10:58
  • 1
    Well I have a GUI but it should work in any condition. So as lowlevel a possible – Maximus Jun 17 '16 at 19:59
  • Even headless, you can graphically log in by installing, for example, the x11vnc server on the headless computer, and using a VNC viewer on another computer to graphically log in with GUI support. Ex: for Windows, UltraVNC is great. Here's an example of doing the whole process: megaleecher.net/Raspberry_Pi_VNC_Setup – Gabriel Staples Aug 29 '16 at 18:57
  • This doesn't work for me. Might be because the partitions are encrypted? – user10853 Nov 2 '16 at 13:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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