0

When I plug flashdrive it gets automounted. Upon web searching I found only two ways it's done in Linux: autofs and using systemd. E.g. rather recent (2017) post: systemd-automount-vs-autofs

However, I could not find neither autofs installed nor file /etc/systemd/system/mnt-scratch.automount (no files with auto in /etc/systemd).

/etc/fstab also does not have any info on automount, just fixed filesystems.

I want to change options of file system being automounted like in fstab. How to find out how automouting is done and change options?

P.S. I'm using Linux Mint now but knowing more general way to do the task is preferred.

3
  • 1
    I've always just done it in Disks. Commented Mar 31, 2018 at 22:32
  • @Ignacio Vazquez-Abrams, thank you I can do that after inserting particular USB-stick. My confusion was initially bacause I could not change options for SD-card reader (and still don't know how), but for ordinary USB it works. Commented Apr 1, 2018 at 15:43
  • You can't do it for the adapter, you have to do it for the media. Commented Apr 1, 2018 at 15:53

1 Answer 1

1

In Linux Mint udisks2.service exists is intended for monitoring disks. Also it does automount for new plugged disks. Just disable it:

systemctl stop udisks2.service 

Then you will be mount disks partitions by hand.

Disable autostart (over systemctl disable udisks2.service) if you want disable it for further boots.

4
  • Interestingly starting Disks starts udisks2.service. Never played with systemctl disable before - command wrote nothing, enable command wrote created symlink, disabling again wrote removed symlink - why different output of disable than first time? Commented Apr 1, 2018 at 15:55
  • It seems service was not enabled. Is automount capability exists when you disabled (stop before) service? Commented Apr 1, 2018 at 16:55
  • Computer did automounting, udisks2 was loaded and active (I did systemctl -a before doing actions) and I have not played with it before, After your post I first stopped it then disabled. Now doing in sequence enabling, start, stop and disabling writes removed sysmlink on disabling step. Commented Apr 2, 2018 at 4:41
  • What type of FS have you mounted? For fat FS codepage= and ioscharset= options exists. For ntfs FS only iocharset= exists. Commented Apr 8, 2018 at 13:49

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.