LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   USB flashdrive automount problem (http://www.linuxquestions.org/questions/slackware-14/usb-flashdrive-automount-problem-270669/)

kaon 12-27-2004 12:35 AM

USB flashdrive automount problem
 
Hi all,

I have done a lot googling and found some ways to automount my lovely USB flashdrive. However, I found that it does not work as I thought.
And I have no idea on locating the problem.

Anyone can help?
Thanks.

Here is my /etc/fstab:

/dev/hda3 swap swap defaults 0 0
/dev/hda2 / reiserfs defaults 1 1
/dev/hda1 /mnt/hda1 vfat defaults,umask=000,iocharset=utf8 0 2
/dev/hdb1 /mnt/hdb1 vfat defaults,umask=000,iocharset=utf8 0 2
/dev/cdrom /mnt/cdrom iso9660 noauto,users,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
/dev/sda1 /mnt/usb vfat defaults,users,rw 0 0

P.S. my flashdrive will be located in /dev/sda1 everytime I plug it into a USB port.

reddazz 12-27-2004 02:20 AM

mine is mounted as follows,

/dev/sda1 /mnt/flash vfat users 0 0

and it works fine.

gnashley 12-28-2004 10:00 AM

At the time when 'mount -a' is run, hotplug has still not been run so you can't automount at that point in time. I'd put a line to mount it in
/etc/rc.d/rc.local instead.

kaon 01-03-2005 08:35 PM

I faced another problem now. If I do not unmount it explicitly, it leaves the mount point in the filesystem unless using umount.

Is there anyway to fix it so that my USB flashdrive can be plugged in and removed at any time I want without issuing any commands.

Thanks.

WMD 01-04-2005 01:00 AM

Quote:

s there anyway to fix it so that my USB flashdrive can be plugged in and removed at any time I want without issuing any commands.
You can't even do that in Windows!

gnashley 01-04-2005 01:19 AM

The device has to flushed before removal. mount and eject both do this.

Cedrik 01-04-2005 05:04 AM

I use autofs to mount and umount automatically my USB camera (which is seen as USB mass
storage), that works fine.

gnashley 01-04-2005 10:28 AM

Do you mean that you are able to just unplug it without any umount/eject command?

kaon 01-04-2005 10:44 AM

Quote:

Originally posted by gnashley
The device has to flushed before removal. mount and eject both do this.
do you mean I have to explictly issue commands "mount"/"umount" to add/remove my USB flashdrive?

Thanks.

Cedrik 01-04-2005 12:49 PM

Quote:

Do you mean that you are able to just unplug it without any umount/eject command?
yes, I just cd into /misc/mydevice and it is automatically mounted
then when I no longer use it, I cd to my home directory then it is automatically umounted

I wait one second before disconnect it, tough to make sure

gnashley 01-04-2005 01:06 PM

Good to know this.

Cedrik 01-04-2005 01:17 PM

If you use the default kernel, autofs is already compiled (as module) so you just :
installpkg autofs

then copy /usr/doc/autofs-xx.xx.xx/samples/auto* in your /etc, edit /etc/auto.misc to suit your
needs and start /etc/rc.d/rc.autofs

I use a konqueror link as icon in KDE so I just click on it to mount it and show the photos, when
I close the konqueror window, the usb camera is umounted
(I checked that with mount command without argument the first time)

cythrawll 01-04-2005 02:31 PM

if you use the flash drive alot, you could just make bash scripts that mount and unmount, and stick them on your desktop... assuming your using a window manager with desktop icons... but you get the idea.

kaon 01-15-2005 01:23 AM

Quote:

Originally posted by Cedrik
If you use the default kernel, autofs is already compiled (as module) so you just :
installpkg autofs

then copy /usr/doc/autofs-xx.xx.xx/samples/auto* in your /etc, edit /etc/auto.misc to suit your
needs and start /etc/rc.d/rc.autofs

I followed your instructions. And I copied rc.autofs.in into /etc/rc.d/ as there is none.
I rename the file to rc.autofs and chmod its permission with +x flag.
tried to start it.
No luck.

Error message:
tsun@sKex:/etc$ /etc/rc.d/rc.autofs
/etc/rc.d/rc.autofs: Unknown system, please port and contact autofs@linux.kernel.org

One more thing, I issued 'mount' to mount my usb flashdrive and found usbfs in the screen with command 'mount'.
Anything deal with that? (Usbfs, the name looks cool :rolleyes: )

tsun@sKex:~$ mount
/dev/hda2 on / type reiserfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/hda1 on /mnt/hda1 type vfat (rw,umask=000,iocharset=utf8)
/dev/hdb1 on /mnt/hdb1 type vfat (rw,umask=000,iocharset=utf8)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /mnt/usb type vfat (rw,umask=000)

Thanks.

keefaz 01-15-2005 04:01 AM

When you do :
lsmod

Do you see autofs module loaded ?
Also could you post your /etc/auto.misc file content ?


All times are GMT -5. The time now is 02:04 AM.