2009/5/25 Mark Knecht <markkne...@gmail.com> > Hi, > I'm wondering what I need to read about and do to get a USB drive > to auto-mount reliably at boot time? I don't know anything about udev > so I tried what I thought used to work in my /etc/fstab file but it > doesn't work. The drive mounts by hand just fine: > > MacMini linux # cat /etc/fstab | grep video > /dev/sda1 /video ext3 auto,rw 0 2 > MacMini linux # df > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/hda4 75890040 60601600 11433376 85% / > udev 10240 164 10076 2% /dev > shm 257396 0 257396 0% /dev/shm > MacMini linux # mount /dev/sda1 /video > MacMini linux # df > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/hda4 75890040 60601604 11433372 85% / > udev 10240 164 10076 2% /dev > shm 257396 0 257396 0% /dev/shm > /dev/sda1 157566568 192068 149370520 1% /video > MacMini linux # > > Must I use udev (and if so how - what do I study to make this work) > or can I do this in fstab and I've just forgotten something simple? > > Also, what's the feeling these days about the reliability of > automounting by device? Would I be better to use e2label on the > partition? > > Thanks in advance, > Mark > >
run *lsusb –v* you will see somethin like this *Bus 003 Device 010: ID 152d:2338* *Device Descriptor:* *...dVendor 0x152d* * idProduct 0x2338* * bcdDevice 1.00* * **iManufacturer 1* * iProduct 2* * iSerial 5* * bNumConfigurations 1* Now make file /etc/udev/rule.d/z98-usb-flash.rules with this content *SUBSYSTEM**=="block**", SYSFS**{idProduct**}=="2338", SYSFS**{idVendor**}=="152d**", NAME**="name**" **RUN+="/bin/mount /dev/name /media/name"* * Change idProduct and idVendor and to your data. And name too. With this name your device will apear in /dev. And of course mkfir /media/name *