LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 10-22-2003, 12:28 AM   #1
robertmarkbram
Member
 
Registered: May 2003
Location: Melbourne, Australia
Distribution: Cygwin, Windows XP
Posts: 69

Rep: Reputation: 15
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
 
Old 10-22-2003, 06:51 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,897

Rep: Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746
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.
 
Old 10-22-2003, 07:14 AM   #3
robertmarkbram
Member
 
Registered: May 2003
Location: Melbourne, Australia
Distribution: Cygwin, Windows XP
Posts: 69

Original Poster
Rep: Reputation: 15
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
 
Old 10-22-2003, 07:16 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,897

Rep: Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746
Yes
mount /mnt/usbstick

umount /mnt/usbstick
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Best supported USB WLAN sticks MS3FGX Linux - Wireless Networking 4 04-17-2006 01:40 PM
mp3 usb players/sticks unihiekka Linux - Hardware 1 12-01-2005 12:32 PM
is there a software for usb mp3 sticks pastulio Linux - Software 1 09-22-2005 03:56 PM
SuSE 9.1: USB sticks won't hotplug bitpicker Linux - Distributions 26 10-10-2004 12:50 AM
USB memory sticks island_dude Linux - Hardware 1 01-20-2004 11:16 AM


All times are GMT -5. The time now is 05:25 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration