6

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

Update

# more /etc/udev/rules.d/85-no-automount.rules
SUBSYSTEM=="usb", ENV{UDISKS_AUTO}="0"
  • 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. – greenoldman 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. – greenoldman Dec 21 '14 at 15:23
7

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 via 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.

Motiviation

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 unter /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

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)

  • 2
    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.