automounting usb flash drive
I am running etch with kde. Whenever I inserted my sandisk usb flash,
it used to get mounted in /media/disk. Though permissions are shown as
drwxr-xr-x, I couldn't write to it. Hence I thought to use
debian-administration article, I made symlink to /dev/sda1 to
/dev/flash with following line in 010_local.rules. It makes it.
lvgdell600m:~# cat /etc/udev/rules.d/010_local.rules
SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{product}=="Cruzer Micro", NAME="%k", SYMLINK="flash", MODE="0775"
lvgdell600m:~# ls -l /dev/flash
lrwxrwxrwx 1 root root 4 2007-01-30 17:43 /dev/flash -> sda1
I installed autofs and have
lvgdell600m:~# cat /etc/auto.master
#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc /etc/auto.misc --timeout=60
#/smb /etc/auto.smb
#/misc /etc/auto.misc
#/net /etc/auto.net
/var/autofs/removable /etc/auto.removable --timeout=2
lvgdell600m:~# cat /etc/auto.removable
flash -fstype=vfat,rw,uid=1000,umask=022 :/dev/flash
ehd -fstype=vfat,rw,uid=1000,umask=022 :/dev/ehd
I made symlink as follows
lvgdell600m:~# ls -l /media/flash
lrwxrwxrwx 1 root root 27 2007-01-30 17:36 /media/flash -> /var/autofs/removable/flash
but /var/autofs/removable/flash is not made by autofs.
lvgdell600m:~# ls -l /var/autofs/removable/flash
ls: /var/autofs/removable/flash: No such file or directory.
I think something else is automounting to /media/disk as before.
How to make autofs work.
Fuerther I get funny results for the same disk.
lvgandhi@lvgdell600m:~$ cp bookmarks.html /media/disk/
cp: overwrite `/media/disk/bookmarks.html'? y
lvgandhi@lvgdell600m:~$ cp dwsp.xls /media/disk/
cp: overwrite `/media/disk/dwsp.xls', overriding mode 0755? y
cp: cannot create regular file `/media/disk/dwsp.xls': Read-only file system
I could cp first file but not for secondfile. but both has same permissions.
lvgandhi@lvgdell600m:~$ ls -l /media/disk/bookmarks.html
-rwxr-xr-x 1 lvgandhi root 648321 2007-01-30 17:47 /media/disk/bookmarks.html
lvgandhi@lvgdell600m:~$ ls -l /media/disk/dwsp.xls
-rwxr-xr-x 1 lvgandhi root 18432 2007-01-28 20:14 /media/disk/dwsp.xls
Anyone can throw some light on this?
--
L.V.Gandhi
http://lvgandhi.tripod.com/
linux user No.205042
Reply to: