LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Mounting different usb-sticks (http://www.linuxquestions.org/questions/linux-hardware-18/mounting-different-usb-sticks-107003/)

robertmarkbram 10-22-2003 01:28 AM

Mounting different usb-sticks
 
Hi All!

I have the following entry in my /etc/fstab file:
/dev/sda1 /mnt/usbstick vfat user,noauto,umask=0 0 0

And this is a script I have for mounting and unmounting my usb stick.
#/bin/bash
# USB
# Created 5 October 2003

if [ -n "$1" -a "$1" = "mount" ]
then
/sbin/modprobe usb-storage
cd /mnt/
mount usbstick/
else
cd /mnt/
umount usbstick/
fi

This seems to work fine for my usb stick, but whenever I unmount it and then try to mount a different usb stick in its place I get:

$./usbFlashDisk.sh mount
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
or too many mounted file systems


Can anyone tell me what is going wrong? Any advice would be most appreciated!

Rob
:)

michaelk 10-22-2003 07:51 AM

What distro are you using? I don't see the need of loading usb-storage module everytime.

Try mounting / unmounting the stick without using your script.

robertmarkbram 10-22-2003 08:14 AM

Hi Michael,

Please excuse the question, but do you mean just to run

mount usbstick/
and
umount usbstick/

?

I will try taking out the
/sbin/modprobe usb-storage
line too...

Rob
:)

michaelk 10-22-2003 08:16 AM

Yes
mount /mnt/usbstick

umount /mnt/usbstick


All times are GMT -5. The time now is 10:42 PM.