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.

Alex Martian
  • 861
  • 2
  • 12
  • 25

1 Answers1

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.

Yurij Goncharuk
  • 4,177
  • 2
  • 19
  • 36
  • 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? – Alex Martian Apr 01 '18 at 15:55
  • It seems service was not enabled. Is automount capability exists when you disabled (stop before) service? – Yurij Goncharuk Apr 01 '18 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. – Alex Martian Apr 02 '18 at 04:41
  • What type of FS have you mounted? For `fat` FS `codepage=` and `ioscharset=` options exists. For `ntfs` FS only `iocharset=` exists. – Yurij Goncharuk Apr 08 '18 at 13:49