LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2006, 10:17 PM   #1
awj78
LQ Newbie
 
Registered: Jan 2006
Posts: 16

Rep: Reputation: 0
USB Flash Drive


I'm trying to use a lexar media usb jumpdrive on Slackware, but when I try to mount it (with mount usbfs), I get

mount: according to mtab, usbfs is already mounted on /proc/bus/usb

What's the deal?
 
Old 01-31-2006, 12:13 AM   #2
patrokov
Member
 
Registered: Jan 2006
Location: Riviera Beach
Distribution: Slackware -current, ArchLinux
Posts: 59

Rep: Reputation: 15
You need to mount it using vfat, not usbfs. Also, on some flash drives, the manufacturer uses some bizarre partitioning scheme that Linux can't recognize. In order to get my SanDisk Cruzer working, I had to delete the partition table, create a new one, and then reformat. (I think the non-standard formatting is part of their "security feature".)

Last edited by patrokov; 01-31-2006 at 12:14 AM.
 
Old 01-31-2006, 12:20 AM   #3
nitinatindore
Member
 
Registered: Dec 2004
Location: India
Distribution: Mandrake, Mandriva, PclinuxOS
Posts: 114

Rep: Reputation: 15
you dont have to mount usbfs,
you have to mount the device to a mount point see "man mount"

Unless you have usb hard disks or otherwise Thumb drive partition is usually /dev/sda1 so you have to mount it as:

#mount /dev/sda1 /mnt/USB
You may replace /mnt/USB with any locations you like.
btw. modern mount usually takes care of filesystem itself,so you dont have to specify it specifically.
 
Old 01-31-2006, 12:21 AM   #4
awj78
LQ Newbie
 
Registered: Jan 2006
Posts: 16

Original Poster
Rep: Reputation: 0
How do you know where the drive is located (/dev/sda1)? Just guess?
 
Old 01-31-2006, 04:40 AM   #5
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Rep: Reputation: 49
Quote:
Originally Posted by awj78
How do you know where the drive is located (/dev/sda1)? Just guess?
Its not just guessing.

USB Flash drives are SATA devices.

Now here, you must know what is SATA and what iS IDE.
Heard of /dev/hda, /dev/hdb?

hda -- this h is for IDE devices.

sda -- this s is for SATA devices.

So, if you don't have any SATA devices attached to your computer (other than your FLash drive) -- like a SATA Hard Drive or CDROM, you will find your Flash Drive under /dev/sda. Otherwise, you may find it under /dev/sdb or /dev/sdc.
/dev/sda1 (this 1 represents the partition number.)

To view more details about your Flash drive, you can run

Code:
$fdisk -l /dev/sda
This is the simplest explanation I can give.

Last edited by duffmckagan; 01-31-2006 at 04:41 AM.
 
Old 01-31-2006, 09:03 AM   #6
awj78
LQ Newbie
 
Registered: Jan 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for all your help!
 
Old 01-31-2006, 12:59 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,120

Rep: Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063Reputation: 6063
Just a minor clarification.
sdx -- The s is for SCSI not SATA.

USB, Firewire and SATA drives are all configured like SCSI devices and thus will have a device ID of /dev/sdx.

SCSI device IDs are typically assigned automatically, i.e. the first drive on the first controller will be sda. The next sdb and so on. If you do not have any other SCSI like devices then indeed it will be sda.
 
Old 01-31-2006, 01:18 PM   #8
duffmckagan
Senior Member
 
Registered: Feb 2005
Distribution: Cent OS 6.4
Posts: 1,163

Rep: Reputation: 49
Aah...sorry.

Thats what I meant :P

For a while, I forgot that SATA is related to HDDs. :P
 
Old 01-31-2006, 11:44 PM   #9
patrokov
Member
 
Registered: Jan 2006
Location: Riviera Beach
Distribution: Slackware -current, ArchLinux
Posts: 59

Rep: Reputation: 15
Which also means that if you don't have scsi support and emulation enabled or loaded as a module, you'll never be able to mount your usb key. Not usually a problem with standard kernels, but if you compile your own, make sure you put it in there.

Interesting trivia: if you pull your usb key out without mounting it, the next time you plug it in, it will not be /dev/sda, but /dev/sdb. If you plug more than one in, they will be successive letters. And finally, if you have any SATA drives, they also get assigned preferentially to the lower letters. So instead of using fdisk -l /dev/sda, it's better to use something like "fdisk -l | grep FAT16" (as most USB keys are formatted with FAT16 to be compatible with Windows).
 
Old 02-02-2006, 11:14 AM   #10
arilect
LQ Newbie
 
Registered: Jan 2006
Location: London, UK
Distribution: Arch, Archie
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by patrokov
Interesting trivia: if you pull your usb key out without mounting it, the next time you plug it in, it will not be /dev/sda, but /dev/sdb. If you plug more than one in, they will be successive letters. And finally, if you have any SATA drives, they also get assigned preferentially to the lower letters. So instead of using fdisk -l /dev/sda, it's better to use something like "fdisk -l | grep FAT16" (as most USB keys are formatted with FAT16 to be compatible with Windows).
I think udev and rules could help to solve the problem. See this article http://www.linuxjournal.com/article/7316.
 
  


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
USB Flash Drive TanSahara Mandriva 7 01-01-2006 11:06 PM
USB Flash drive trainee Slackware 3 05-18-2005 01:50 PM
USB Flash Drive LunarEagle Linux - Newbie 5 03-22-2005 04:11 PM
usb flash drive 1337_n00b Amigo 1 02-13-2005 12:25 AM
usb flash drive tyiooo Linux - Hardware 11 08-09-2003 01:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:40 PM.

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