Previously I used openSUSE 11.4 and I had an old manual mount. Despite, I copied all config files (I think) I noticed that unknown to /etc/fstab devices are automounted (know I defined as noauto). But since this is big difference in openSUSE 13.2 distro versions I am not so surprised.

So how to do this in openSUSE 13.2? I would like to mount the device manually by mount, and unmount also manually by umount. No other way, no smart timeout on inactivity or anything like that.

I would like to disable that feature at system level, nothing per desktop (for the record I use KDE 3.5, not a joke), so I could be 100% sure this problem will not appear again when working in pure console or another desktop.

Related issue provided by don-crissti: Automount not disabling in Ubuntu 12.04 or 13.04


# more /etc/udev/rules.d/85-no-automount.rules
  • kernel-desktop-devel-3.16.6-2.1.x86_64
  • udev-210-25.5.4.x86_64
  • udisks2-2.1.3-2.1.5.x86_64
  • @don_crissti, thank you, I tried just fixing the typo (it was in original post you linked), and I tried your version, with both pendrive is still automounted. Dec 21 '14 at 9:03
  • @don_crissti, I am grateful nevertheless for your help. Maybe OS has some bug or issue which requires other handling. Dec 21 '14 at 15:23
  • sudo -i /bin/bash -c "echo 'SUBSYSTEM=="usb", ENV{UDISKS_AUTO}="0"' > /etc/udev/rules.d/85-no-automount.rules; service udev restart; cat /etc/udev/rules.d/85-no-automount.rules" (dont know why regular sudo doenst work)
    – alchemy
    Apr 30 '20 at 0:13

The automounting you see on a modern Linux distribution like OpenSUSE or Fedora is implemented by the udisks2 service.

Thus, you can disable that feature on system level by stopping that service, e.g.:

# systemctl stop udisks2.service

To verify that it is stopped:

# systemctl status udisks2

Of course, this change isn't permanent.

The udisks2 service isn't even enabled, by default and thus isn't autostarted during boot. Instead, it is activated via Dbus (e.g. when the first user starts a desktop session).

Thus, if you really hate udisks2:

$ systemctl mask udisks2

This will block all starts, including manual ones.


Why would one want to disable automounting via the fine disks2 disk manager?

There are several good reasons, e.g.

  • work around a udisks2 automount bug1
  • do forensics work on some USB drives
  • rescue data from a corrupted FS on a USB device (where the automount would lead to more destruction)

1. e.g. on Fedora 25, when connecting 2 USB devices that are a Btrfs RAID-1 mirror, the mirror is automounted under /run/media/juser/mirror alright - BUT it also mounted a second time under /run/media/juser/mirror1 when unlocking the screen ... while the first mount is still live ...

  • 1
    systemctl mask udisks2 I have been manually stopping it since the beginning of time, this made my day!
    – asynts
    Mar 8 '20 at 11:26
# /etc/udev/rules.d/99-noautomount.rules


https://www.systutorials.com/docs/linux/man/7-udisks/ :

  If set to 1 this is a hint to presentation level software that the device should not be shown to the user.

  If set to 1 this is a hint to presentation level software that the device should not be automounted or autoassembled (for e.g. components of a multi-disk device).

  A variable to influence whether a device should be automounted. Possible values include "always" (to hint that a device should always be automounted) and "never" (to hint that a device should never be automounted). Note that this is only a hint - the auto-mounter might not honor it.

  If set, this will override the usual bus type based detection of whether a device is considered "system internal". "0" means "removable" (i. e. eligible for automounting, and normal users can mount), any other value means "system internal" (i. e. no automounting, and only administrators can mount).

https://www.systutorials.com/docs/linux/man/8-udisks/ :

  If set, this overrides the value of the HintIgnore property.

  If set, this overrides the value of the HintAuto property.
  • 2
    Can you also explain why that works?
    – RalfFriedl
    Aug 20 '19 at 21:59
  • I edited the answer to include some man page descriptions. The UDISKS_PRESENTATION_HIDE and UDISKS_IGNORE may be irrelevant. Aug 22 '19 at 12:05

simple reason is. The permitions on udisk2 are wrong if you mount usb vfat. And the documentation how to modify that is lo level.

Using: raspberry 3, VERSION="9 (stretch)"

I tried to use small SVN repo on USB Flash drive. I always got the problem that apache (www-data) could not access the repo. Because the permitions are always set only for user pi (pi:pi). I did not find where i chan change this.

Now autoload is disabled and i mount the drive myself. Then the permitions are ok. (root:users)

  • 3
    The problem is that the system is automatically mounting a device that the OP doesn't want to be automatically mounted — and you say it's a permissions issue?  Can you provide a reference to support that claim, or even an argument as to how it makes sense? Please do not respond in comments; edit your answer to make it clearer and more complete.
    – Scott
    Nov 24 '18 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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