2 2
Superkoning

FYI: auto-mount USB-disk with "usbmount"

Recommended Posts

This is a FYI:

 

My armbian did not automount my USB-disk. Possbile reason "By default, disk drives do not auto-mount in Ubuntu Server Edition.".

 

Anyway: I solved it with usbmount:

 

First install usbmount.

 

Then, in /etc/usbmount/usbmount.conf change the line

 

#MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"

 

to

 

MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,user,umask=0000"

 

to make it writeable for all users. 

 

HTH

 

Share this post


Link to post
Share on other sites
9 hours ago, marine1988 said:

i can´t find usbmount in last version of armbian :(

 

 

$ apt search usbmount
Sorting... Done
Full Text Search... Done
usbmount/xenial,xenial,now 0.0.22 all [installed]
  automatically mount and unmount USB mass storage devices


and


 

sudo apt-get install usbmount

 

HTH

Share this post


Link to post
Share on other sites
On 10/1/2018 at 6:04 AM, Superkoning said:

 

 


$ apt search usbmount
Sorting... Done
Full Text Search... Done
usbmount/xenial,xenial,now 0.0.22 all [installed]
  automatically mount and unmount USB mass storage devices


and


 


sudo apt-get install usbmount

 

HTH

no luck here on orange pi prime with last beta armbian version 

"

 pi@orangepiprime:~$ apt search usbmount
Sorting... Done
Full Text Search... Done
pi@orangepiprime:~$
"

Share this post


Link to post
Share on other sites

Didn't work for me on Nanopi Neo2 with Bionic Beaver. Any other suggestions?

Share this post


Link to post
Share on other sites

There seems to be a bug, source: https://codeyarns.com/2019/05/18/usbmount-not-mounting-problem/

Solution:

systemd seems to be the culprit. It sets MountFlags=slave in its systemd-udevd.service file, which causes, the mount operation of usbmount mounting into the namespace of systemd and not to the user.

 

To change this mount option, run this command:

 

sudo systemctl edit systemd-udevd

 

Add these lines to the file:

 

[Service]
MountFlags=shared


This creates the file /etc/systemd/system/systemd-udevd.service.d/override.conf with the above lines.


Restart systemd on your NanoPi Neo2:


sudo systemctl daemon-reload
sudo service systemd-udevd --full-restart

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
2 2