Opened 14 years ago

Closed 12 years ago

Last modified 10 years ago

#3023 closed enhancement (wontfix)

Add new udev rule for automount of USB devices

Reported by: Robert L. Inglis Owned by: blfs-book@…
Priority: normal Milestone:
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

After working with several help pages and never quite getting "mount' to mount a usb-pendrive rw unless it was specified in /etc/fstab. I finally installed pmount (cvs) and wrote a successful auto-mount rule. See attached. If someone can suggest an improvement it would be appreciated.

Attachments (3)

71-removable-media.rules (211 bytes ) - added by Robert L. Inglis 14 years ago.
71-removable-media-1.rules (168 bytes ) - added by Robert L. Inglis 14 years ago.
Improved functionality and excludes the possiblity of mounting your SCSI HDDs
71-removable-media-2.rules (168 bytes ) - added by Robert L. Inglis 14 years ago.
Another refinement

Download all attachments as: .zip

Change History (9)

by Robert L. Inglis, 14 years ago

Attachment: 71-removable-media.rules added

by Robert L. Inglis, 14 years ago

Attachment: 71-removable-media-1.rules added

Improved functionality and excludes the possiblity of mounting your SCSI HDDs

comment:1 by Robert L. Inglis, 14 years ago

After a bit more work a better udev rule.

I noticed some issues with original.

Depending on what type of HDDs you use you could end up mounting them under /media as well as their normal mount point. You needed to exclude their device letter from the rule. Not exactly my intention.

Also pumount sometimes would leave the device mounted if you inserted/removed the same device several times. You ended up with several /dev/sd%1 mounted on the same mount point but with different /dev/sd%1 assignment. By changing the pumount argument from /dev/sd%1 to /media/usb%n it seems to have resolve this issue.

So far this new rule mounts/umounts without an issue. It also removes the /media/usb%n directory when you remove the device.

Using mount to mount the devices you need to have a /etc/fstab entry with correct write permissions. I wanted dynamically mounted usbdrives, mount so far will not accomplish this objective. Now to get the desktop to notify me when a drive is inserted.....

by Robert L. Inglis, 14 years ago

Attachment: 71-removable-media-2.rules added

Another refinement

comment:2 by Robert L. Inglis, 14 years ago

Seems the 71-removable-media-1 rule resolved most issues I had with the original rule but it would also mount any concurrent thumb drive to the same /media directory.

Added kernel ID vs partition number to the link/mount/umount statement to differentiate between the multiple thumb drives.

comment:3 by Randy McMurchy, 13 years ago

Milestone: future6.7

Updated milestone to 6.7

comment:4 by bdubbs@…, 12 years ago

Milestone: 6.7current

comment:5 by ken@…, 12 years ago

Resolution: wontfix
Status: newclosed

If we installed pmount, adding rules would make sense. But we don't. Some of us write our own rules to match the devices we have accumulated, others add entries to /etc/fstab such as

/dev/sdc1 /mnt/usb auto user,noauto,umask=0,utf8

Closing.

comment:6 by bdubbs@…, 10 years ago

Milestone: current

Milestone current deleted

Note: See TracTickets for help on using tickets.