[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev and automounting



On Thu, Sep 27, 2007 at 01:50:11PM +0200, Dan H wrote:
> Hello,
> 
> I'm really having trouble getting my head around udev and udev rules
> for removeable USB devices. When I plug in my USB stick, it automounts
> under /media/sda1. What I don't like is that I have to "su" to write
> to the stick and to unmount it again, so this automounting is pretty
> useless. I've tried to decipher the files under /etc/udev to find the
> rule that actually mounts stuff, but grepping for "mount" just shows
> me some unmounting detail in a file called "hal.rules".
> 
> What I'd like is:
> 
> 1. Automounting USB mass storage devices under some unique name
> determined by the label of the partition
> 
> 2. Write access and unmounting by normal user.
> 
> I've seen this work transparently under Gnome and KDE, but I use fvwm
> or no X at all so that's no option for me.

I've never had a problem; I've never used automount.

What type of filesystem is on the USB and who created it?  If root
created an ext2, then it belongs to root.  You would want to create it
as your own user.  If its FAT* then use the UID/GID mount options.

Put the mount point in /etc/fstab and use the user option.

You can use the LABEL= instead of a device name and create per-LABEL
mount points and put them all in fstab.

Doug.



Reply to: