You are not logged in.
Somewhere in the last month or two this started happening. I have mountpoints in /mnt for five partitions. For example:
<from /etc/fstab>
#/dev/sda1 debian
UUID=cd022175-b7ba-44c8-8f44-a954f5b30c6d /mnt/debian ext3 user,noauto 0 0
Now I find debian is being automounted under /media:
<from 'mount'>
/dev/sda1 on /media/DEBIAN type ext3 (rw,relatime,data=ordered)
How can I turn this off and go back to putting these partitions out of sight unless manually mounted?
Last edited by bpeary (2012-08-26 14:20:24)
Offline
Check your /etc/udev/rules.d: it seems like you have media_by_label_auto_mount or a similar bit enabled (IIRC, this is supposed to automatically mount drives in /media).
Last edited by bohoomil (2012-08-25 01:23:07)
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
Maybe you should swap notes (or systems) with the OP in https://bbs.archlinux.org/viewtopic.php?id=146937 .
What DE/WM are you using?
Are the mount points there on boot? Are the file systems mounted on boot?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Thanks, bohoomil. I don't understand most of this script, but I
commented out the ACTION line under #Mount the device, and it seems to
be doing what I want: all those partitions are no longer
auto-mounted, and it still mounts a USB when plugged in.
Thanks cfr. Yes, I saw those posts for the guy whose partitions
WOULDN'T mount -- considered posting there, but figured nobody looks
down to the bottom of an old topic. I'm using xfce. This is a bios
system amd-64 booted by grub-legacy. I could see those filesystems
being mounted during boot, via dmesg.
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs",
ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=0$
# Mount the device
#ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"
# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"
# Exit
LABEL="media_by_label_auto_mount_end"
Offline
Please remember to mark this [SOLVED].
I wasn't suggesting for a moment you should have posted in the other thread, by the way. It just struck me as kind of interesting that there were two threads one with an OP in situation A who wanted to be in situation B and the other with an OP in B who wanted to be in A. And it was just possible that something in that thread might cast light on your question or vice-versa.
EDIT: It is interesting you had rules under /etc/rules.d which you didn't want. On my system, this directory is completely empty...
Last edited by cfr (2012-08-25 21:08:07)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Thanks, bohoomil. I don't understand most of this script, but I
commented out the ACTION line under #Mount the device, and it seems to
be doing what I want: all those partitions are no longer
auto-mounted, and it still mounts a USB when plugged in.
Great. udev files are a bit odd, but after a little struggle can be customized to fit your needs. For instance, you can limit the range of drives to be auto-mounted using udev rules by editing the very first line:
KERNEL!="sd[b-z][0-9]", GOTO="media_by_label_auto_mount_end"
-- in my case only the devices I plug in appear in the /media directory. It does what you want and still follows udev rules logic.
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline