LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-22-2005, 02:52 PM   #1
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
some USBstick help please


well followed the HOWTO on this site and it worked perfectly for my laptop, but not for my gaming box.

both are running the 2.6.x kernels.

here is my dmesg about the usb stick:

Code:
usb 1-2: new high speed USB device using ehci_hcd and address 3
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
  Vendor:           Model: USB Flash Memory  Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sdc: 2002944 512-byte hdwr sectors (1026 MB)
sdc: assuming Write Enabled
sdc: assuming drive cache: write through
SCSI device sdc: 2002944 512-byte hdwr sectors (1026 MB)
sdc: assuming Write Enabled
sdc: assuming drive cache: write through
 /dev/scsi/host2/bus0/target0/lun0: p1
Attached scsi removable disk sdc at scsi2, channel 0, id 0, lun 0
Attached scsi generic sg2 at scsi2, channel 0, id 0, lun 0,  type 0
usb-storage: device scan complete
so it is detected, and if i read this correctly it is placed on sdc(i am guessing 0) so i made a line in my fstab look like the following:

Code:
/dev/sdc1       /mnt/camera     auto    defaults,user,noauto    0       0
/dev/sdc2       /mnt/USBdrive   auto    user,rw,auto    0       0
had to put it on 2 as i already have my USB camera on 1. is this right or wrong? i have tried noauto in the user,rw,auto and still get the same 2 errors:

as user i get the following:

Code:
$ mount /mnt/USBdrive/
mount: I could not determine the filesystem type, and none was specified
ray@p4ssmahome:~$ mount -t vfat /mnt/USBdrive/
mount: only root can do that
so as root i try to mount it and get the following:
Code:
$ su -
Password:
p4ssmahome:~# mount /mnt/USBdrive/
mount: you must specify the filesystem type
p4ssmahome:~# mount -t vfat /mnt/USBdrive/
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .
ok so what is going on?
 
Old 07-22-2005, 03:19 PM   #2
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 47
Assuming you have the correct device sdc2, root would mount like this:

# mount -t vfat /dev/sdc2 /mnt/USBdrive/

KC
 
Old 07-22-2005, 03:32 PM   #3
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
ok i see what root was doing wrong, but why on my laptop can user mount /mnt/USBstick and be done with it?

i would like user to be able to mount and umount that device.
 
Old 07-22-2005, 03:39 PM   #4
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 47
Well, if you were able to mount ok using vfat as root then replace "auto" with "vfat" in your fstab then user should be able to mount without fs type error...

KC
 
Old 07-22-2005, 03:42 PM   #5
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
ok that works, can you explain why when the fstab on both the laptop and game box (basically the same except the sdx part) i do not need a file type on the laptop, but do on the game box?
 
Old 07-22-2005, 03:48 PM   #6
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 47
Good question... If they both have the same distro then its probably a kernel issue with the file system detection... Beyond guessing, I would have to reasearch a little more on that...

KC
 
Old 07-22-2005, 03:58 PM   #7
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
ok, one is 2.6.9, other is 2.6.11, both are debian.
 
Old 07-23-2005, 05:45 PM   #8
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
well that did not work:

Code:
ray@p4ssmahome:~$ mount -t vfat /dev/sdc2 /mnt/USBdrive/
mount: only root can do that
ray@p4ssmahome:~$ su -
Password:
p4ssmahome:~# mount -t vfat /dev/sdc2 /mnt/USBdrive/
mount: /dev/sdc2 is not a valid block device
p4ssmahome:~#
*sad*
 
Old 07-23-2005, 05:49 PM   #9
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
fixed it. changed the sdc2 to sdc1 and it now works for both root and user the same way it does on the laptop.
 
Old 07-24-2005, 05:00 AM   #10
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
Yep. You were defeated by a misunderstanding of the naming convention

sdc means the third SCSI disc detected by the system. sdc1 is the first partition on the disk, sdc2 the second partition on the same disk.

So if you plug in your camera, it'll be sdc, and its first partition sdc1

If you then plug in your flash disk, it'll be sdd with the first partition sdd1, as sdc already exists

But if you unplug your camera and THEN plug in the flash disc, it will then be sdc

It's a logical enough system, but it can be annoying if you always want a piece of hardware to have the same name, rather than it depending on what order you plug things in.

You can set up udev so that hardware will always have the same /dev address no matter when you plug it in, should you feel the need.
 
Old 07-24-2005, 11:20 AM   #11
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
ahh ok, now i understand exactly what was going on. thank you for that tidbit of info. very kewl to learn from mistakes and even better to learn WHY.
 
Old 07-26-2005, 12:00 AM   #12
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
ok next question. on my game box with the sdc1, what if i wanted to mount both my USB stick and my USB camera at the same time?

can i add a duplicate line in my /etc/fstab and just replace the 1 with a 2 for both devices so i can mount both or either and not worry about it?
 
Old 07-26-2005, 02:36 AM   #13
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
Yep, but you'd want to change sdc1 to sdd1, not sdc2. . .
 
Old 07-26-2005, 12:13 PM   #14
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Original Poster
Rep: Reputation: 45
Quote:
Originally posted by oneandoneis2
Yep, but you'd want to change sdc1 to sdd1, not sdc2. . .
ok so i would want my /etc/fstab to look like:

Code:
/dev/sdc1       /mnt/camera     auto    defaults,user,noauto    0       0
/dev/sdc1       /mnt/USBdrive   auto    user,rw,auto    0       0

/dev/sdd1       /mnt/camera     auto    defaults,user,noauto    0       0
/dev/sdd1       /mnt/USBdrive   auto    user,rw,auto    0       0
and that would not mess anything up, and alow me to mount them single, or mount them together.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot mount usbstick verbose Linux - Hardware 25 09-19-2005 06:26 PM
Writespeed USBstick is horrible in updated FC3. sjonie100 Fedora 0 08-02-2005 05:56 AM
USBstick problems! chansen0421 Linux - Newbie 4 01-15-2005 01:40 PM


All times are GMT -5. The time now is 09:18 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