LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-27-2004, 12:35 AM   #1
kaon
Member
 
Registered: Dec 2003
Location: Hong Kong SAR
Distribution: Slackware 9.1, 10.x, slackware-current
Posts: 186

Rep: Reputation: 30
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.
 
Old 12-27-2004, 02:20 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
mine is mounted as follows,

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

and it works fine.
 
Old 12-28-2004, 10:00 AM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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.
 
Old 01-03-2005, 08:35 PM   #4
kaon
Member
 
Registered: Dec 2003
Location: Hong Kong SAR
Distribution: Slackware 9.1, 10.x, slackware-current
Posts: 186

Original Poster
Rep: Reputation: 30
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.
 
Old 01-04-2005, 01:00 AM   #5
WMD
Member
 
Registered: Jul 2004
Location: Florida
Distribution: Slackware, Debian
Posts: 484

Rep: Reputation: 30
Talking

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!
 
Old 01-04-2005, 01:19 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
The device has to flushed before removal. mount and eject both do this.
 
Old 01-04-2005, 05:04 AM   #7
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
I use autofs to mount and umount automatically my USB camera (which is seen as USB mass
storage), that works fine.
 
Old 01-04-2005, 10:28 AM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Do you mean that you are able to just unplug it without any umount/eject command?
 
Old 01-04-2005, 10:44 AM   #9
kaon
Member
 
Registered: Dec 2003
Location: Hong Kong SAR
Distribution: Slackware 9.1, 10.x, slackware-current
Posts: 186

Original Poster
Rep: Reputation: 30
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.
 
Old 01-04-2005, 12:49 PM   #10
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
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
 
Old 01-04-2005, 01:06 PM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Good to know this.
 
Old 01-04-2005, 01:17 PM   #12
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
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)
 
Old 01-04-2005, 02:31 PM   #13
cythrawll
Member
 
Registered: Nov 2004
Location: IL, USA
Distribution: Slackware 10
Posts: 167

Rep: Reputation: 31
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.
 
Old 01-15-2005, 01:23 AM   #14
kaon
Member
 
Registered: Dec 2003
Location: Hong Kong SAR
Distribution: Slackware 9.1, 10.x, slackware-current
Posts: 186

Original Poster
Rep: Reputation: 30
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 )

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.
 
Old 01-15-2005, 04:01 AM   #15
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
When you do :
lsmod

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can not mount usb flashdrive walterbyrd Debian 14 03-18-2006 12:53 PM
still more USB flashdrive problems... Lord Zoltar Linux - Hardware 8 01-22-2005 12:38 PM
USB flashdrive problems endfx Linux - Hardware 11 01-01-2005 05:40 PM
USB FlashDrive -- Again kadalz Linux - Newbie 1 10-12-2003 11:20 AM
USB Flashdrive disto cli_man General 7 02-23-2003 04:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration