You are not logged in.

#1 2010-12-12 03:43:57

yvonney
Member
Registered: 2008-06-11
Posts: 671

Always do a manual drive mount: now (udev?) is mounting as usbhd-sdxx

Hi, have read the related thread and don't have enough skill/info to remedy.
What's the best/easiest/least invasive way to go back to totally manual mounting of USB devices.
Also, have considered that something I installed to try may have been the cause so not sure it's any udev 'feature' ?

Info/fix needed and appreciated.
thanks

Last edited by yvonney (2010-12-12 03:44:55)

Offline

#2 2010-12-12 04:10:35

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Always do a manual drive mount: now (udev?) is mounting as usbhd-sdxx

To prevent udev mounting a device/partition, I create a an entry for the device in /etc/fstab since udev ignores anything it finds in there. YMMV.

Offline

#3 2010-12-12 04:12:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Always do a manual drive mount: now (udev?) is mounting as usbhd-sdxx

yvonney wrote:

What's the best/easiest/least invasive way to go back to totally manual mounting of USB devices.

Remove the udev rule.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2010-12-12 04:44:04

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Always do a manual drive mount: now (udev?) is mounting as usbhd-sdxx

Read the WIKI (read post earlier)
And, there's a whole lotta /media type rules

Here's the one I thought might be up for a guess with.
I'm going to now delete what appear logical.
I've also read there's other methods (ie. don't delete) though delete rule is fine with me.

Yes, also gonna get my fstab ability improved this month as well hopefully!
HUGELY GREAT to hear from you. THANK YOU BOTH

UPDATE: had a look with ranger and there's only a few rules! nice!
I'm gonna try just renaming the entire rule.


/etc/udev/rules.d/11-media-by-label-auto-mount.rules

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=002"

# 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"

Last edited by yvonney (2010-12-12 04:47:11)

Offline

#5 2010-12-13 12:28:21

xirotyu
Member
From: Jakarta, Indonesia
Registered: 2010-07-01
Posts: 14

Re: Always do a manual drive mount: now (udev?) is mounting as usbhd-sdxx

fukawi2 wrote:

To prevent udev mounting a device/partition, I create a an entry for the device in /etc/fstab since udev ignores anything it finds in there. YMMV.

i have problem. the udev always mount device whether the device listed on fstab or not, i think it start from the last udev update? make my ntfs partition dirty forced me to use windows again.... i using rules from the wiki page.


#(x'_____')

Offline

Board footer

Powered by FluxBB