auto-mounting USB drives

pkaplan1 at comcast.net pkaplan1 at comcast.net
Mon Aug 14 16:07:39 UTC 2006


 -------------- Original message ----------------------
From: Raphael Schneider <rasch_sub at med1.med.tum.de>
> On Sunday 13 August 2006 13:18, pkaplan1 at comcast.net wrote:
> > I chose to use /etc/fstab entries since it fixed the mountpoints for the
> > drive/partitions.  Any ideas on other ways to either force the specific
> > drive to always mount at the same location even if other hardware is
> > present? Paul
> I am using udev rules to assign fixed names to my USB devices. 
> In /etc/udev/rules.d I have the file /etc/udev/rules.d/10-locals.rules with 

> the following content:
> BUS="scsi", SYSFS{model}="iPod            ", KERNEL="sd*", NAME="%k", \ 
> SYMLINK="ipod"
> BUS="scsi", SYSFS{model}="Flash Disk      ", KERNEL="sd*", NAME="%k", \ 
> SYMLINK="usb1gb"
> BUS="scsi", SYSFS{model}="2500JB External ", KERNEL="sd*", NAME="%k", \ 
> SYMLINK="wd250g"
> BUS="scsi", SYSFS{model}="5000KS External ", KERNEL="sd*", NAME="%k", \ 
> SYMLINK="wd500g"
> BUS="scsi", SYSFS{model}="USBDrive        ", KERNEL="sd*", NAME="%k", \ 
> SYMLINK="usb2gb"
> 
> ('\' means "real" line continues on next "text" line)
> 
> This entries generate symlinks in /dev to the actual used sd entry. For 
> example when I attach my 250GB Western Digital external drive, the 
> entry /dev/wd250g is created and I can use this to mount the drive.
> 
> To get the name your drive is used, look in /var/log/messages after attaching 
> your drive to see what name your drive is using.
> 
> HTH
> Raphael
> 
Raphael,
Did the file /etc/udev/rules.d/10-locales.rules exist on your system or did you create it?  Is there a HOWTO for configuring this?

My /etc/udev/rules.d/ directory has only the following files:
00-init.rules
025_logitechmouse.rules
20-names.rules
25-iftab.rules
40-permissions.rules
45-libgphoto2.rules
45-libsane.rules
45-logitechmouse.rules
60-symlinks.rules
65-persistent-disk.rules
80-programs.rules
85-alsa.rules
85-hal.rules
85-hdparm.rules
85-hwclock.rules
85-ifupdown.rules
90-hal.rules
90-modprobe.rules
99-udevmonitor.rules
85-pcmcia.rules




More information about the ubuntu-users mailing list