• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  Linux Stuff / General Linux questions / Re: Automounting on: May 24, 2009, 11:18:58 PM
Hi,

You can use udev rules to assign custom device names to transient devices (such as USB flash drives) - check http://archive.atomicmpc.com.au/forums.asp?s=2&c=16&t=4775 or http://www.reactivated.net/writing_udev_rules.html and scripts in udev rules can be used to automatically mount such devices on specific mount points, but in your case I would rather use UUID or volume label (man fstab) to mount system partitions, e.g.:

LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot          /boot                ext3    defaults        1 2
LABEL=/var            /var                  ext3    defaults        1 2


To use automount create /etc/auto.master:
/media /etc/auto.media

and /etc/auto.media (to automount /dev/my_sd on /media/sd):
sd   auto,rw,nosuid,nodev :/dev/my_sd

where my_sd is a custom /dev symlink created using udev rule (see above links). Of course, you can also use udev scripts to automagically mount/umount flash drives.

BR.
Pages: [1]