LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 08-23-2007, 12:10 AM   #1
ddlawrence
LQ Newbie
 
Registered: Aug 2007
Location: Vancouver Island, Canada
Distribution: Fedora Core
Posts: 24

Rep: Reputation: 16
Thumbs up USB troubleshooting


Hi. I just wiped Billion dollar Billy off my disk and it feels great.
Now the USB jump drives don't work (they did b4).
There is a USB record from the mount command.
However there is no USB record in /etc/fstab.
Is there some way of verifying they were mounted correctly?
Where should the mount location be?
Maybe I am not accessing it correctly.
What is a good book to buy for nut & bolts stuff?

longlivelinux...........don
 
Old 08-23-2007, 02:00 AM   #2
virens
LQ Newbie
 
Registered: Aug 2007
Distribution: Debian GNU/Linux
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by ddlawrence View Post
Is there some way of verifying they were mounted correctly?
Simplest is to try access to mounted USB stick. More complicated - type
Code:
df
in terminal, and look at last column, were mount point is shown.

Quote:
Originally Posted by ddlawrence View Post
Where should the mount location be?
Mainly in directories /mnt or /media

Quote:
Originally Posted by ddlawrence View Post
What is a good book to buy for nut & bolts stuff?
They are out of date, mostly. I prefer blogs, this is freshest information about Linux.
 
Old 08-24-2007, 04:55 AM   #3
tp11235
Member
 
Registered: Feb 2005
Posts: 106
Blog Entries: 1

Rep: Reputation: 15
If virens advice works, that's great. If not have you checked that your system is actually driving the usb ports properly?

Is USB mass storage enabled in the kernel? If you have some sort of vanilla it-does-it-all-for-you setup then it probably is but we can check how it is handling things.

Try this command:

cat /proc/bus/usb/devices

You should get a raft of information on what is going on with your usb system. These are extracts from mine for my USB external hard drive and a memory stick:

T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=059b ProdID=0075 Rev=11.00
S: Manufacturer=Iomega
S: Product=External Hard Drive
S: SerialNumber=11100E00005B2355
C:* #Ifs= 1 Cfg#= 2 Atr=c0 MxPwr= 98mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=64ms

T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=13fe ProdID=1d00 Rev= 1.10
S: Manufacturer=Kingston
S: Product=DataTraveler 2.0
S: SerialNumber=5B6B0992AA6A
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Also try unplugging the device and run the command again - the entries should disappear.

If you do not get this data then you may be advised to take a look at the kernel setup.

My settings are:

SCSI device support, disk support and generic support (more of this later) Then various obvious settings in USB device support.

< > RAID Transport Class │ │
│ │ <*> SCSI device support │ │
│ │ [ ] legacy /proc/scsi/ support │ │
│ │ --- SCSI support type (disk, tape, CD-ROM) │ │
│ │ <*> SCSI disk support │ │
│ │ < > SCSI tape support │ │
│ │ < > SCSI OnStream SC-x0 tape support │ │
│ │ < > SCSI CDROM support │ │
│ │ <*> SCSI generic support

<*> Support for Host-side USB │ │
│ │ [ ] USB verbose debug messages │ │
│ │ --- Miscellaneous USB options │ │
│ │[*] USB device filesystem │ │
│ │ --- USB Host Controller Drivers │ │
│ │ <*> EHCI HCD (USB 2.0) support │ │
│ │ < > ISP116X HCD support │ │
│ │ <*> OHCI HCD support │ │
│ │ <*> UHCI HCD (most Intel and VIA) support │ │
│ │ < > SL811HS HCD support │ │
│ │ --- USB Device Class drivers │ │
│ │ < > USB Modem (CDC ACM) support │ │
│ │ <*> USB Printer support │ │
│ │ --- NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' │ │
│ │ --- may also be needed; see USB_STORAGE Help for more information │ │
│ │ <*> USB Mass Storage support │ │
│ │ [ ] USB Mass Storage verbose debug │ │
│ │ [ ] Freecom USB/ATAPI Bridge support │ │
│ │ [ ] ISD-200 USB/ATA Bridge support │ │
│ │ [ ] Microtech/ZiO! CompactFlash/SmartMedia support │ │
│ │ [ ] Support for Rio Karma music player │ │
│ │ [ ] The shared table of common (or usual) storage devices


On the other hand if you do get the correct reports from /proc above and it is still not working then we need to look at the mounting.

My system (and I think it is not unique) uses SCSI emulation to provide support for USB devices. Therefore you can get at the USB drives by mounting various /dev/sd** devices. cd to /dev and do a ls -l to see what /dev/sd** options you have.

The example below is how I mount my memory stick to a directory /mnt/mstick that I created with mkdir.

Fred / # mount -rw /dev/sdb1 /mnt/mstick
Fred / # cd /mnt/mstick
Fred mstick # ls -l
total 15476
-rw------- 2 root root 90112 Jan 11 2007 200708 Calendar.doc
drwx------ 1 root root 4096 May 18 11:24 ANSWERS
drwx------ 1 root root 4096 Jun 7 13:10 Back ups
-rw------- 2 root root 238080 Jul 17 14:24 Backup of Lesson Planner XML.xlk

I do not put a line in fstab for the memory stick because I do not use it with the system very often. I just mount it manually as and when I need it with the command above. Unless you put a line in fstab or the line gets put in at installation then there will not be one. It is up to you whether the usb drive will be there frequently or not. I have a line for my external hard drive:

/dev/hda1 /boot ext2 noatime 1 2
/dev/hda3 / ext3 noatime 0 1
/dev/hda2 none swap sw 0 0
/dev/hdb3 /data ext3 noatime 0 0
/dev/sda1 /iomega ext3 noatime 0 0
/dev/cdrw /mnt/cdrom iso9660 rw 0 0


I am one of the oldies here and I like books. I have found three books to be really useful:

The first two are basic references, if you do buy a book get both together. The first one covers the basic setup of a system. The second is a comprehensive reference of all the commands and parts of the system

Welsh et al. (1999) Running Linux Sebastapol CA: O'Reilly
Siever et al. (2003) Linux in a Nutshell Sebastapol CA: O'Reilly

This book is a detailed how-to for setting up a webserver:
Rosebrock and Filson (2004) Setting up LAMP Alameda CA: Sybex

It is true that Linux moves on, but the basics are unchanged. In fact the fundamental ideas go back to Unix in the 70s and 80s so books written in 1999 are still very valid!

http://www.albion.com/security/intro-2.html

Let me know how you get on.

Tim.
 
Old 08-26-2007, 12:34 AM   #4
ddlawrence
LQ Newbie
 
Registered: Aug 2007
Location: Vancouver Island, Canada
Distribution: Fedora Core
Posts: 24

Original Poster
Rep: Reputation: 16
much thanks

HI TIM. YOU HIT THE MARK. I SHOULD HAVE GUESSED THE MEMORYSTICK
DID NOT AUTO MOUNT. BTW HOW DO I DUMP TH E KERNEL SETUP?

ALSO THANKS FOR THE REF BOOKS. i HAVE MUCH READING TO DO.

REGARDS & THANKS AGAIN......DON

[quote=tp11235;2868938]If virens advice works, that's great. If not have you checked that your system is actually driving the usb ports properly?

Is USB mass storage enabled in the kernel? If you have some sort of vanilla it-does-it-all-for-you setup then it probably is but we can check how it is handling things.

Try this command:

cat /proc/bus/usb/devices

You should get a raft of information on what is going on with your usb system. These are extracts from mine for my USB external hard drive and a memory stick:

T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=059b ProdID=0075 Rev=11.00
S: Manufacturer=Iomega
S: Product=External Hard Drive
S: SerialNumber=11100E00005B2355
C:* #Ifs= 1 Cfg#= 2 Atr=c0 MxPwr= 98mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=64ms

T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=13fe ProdID=1d00 Rev= 1.10
S: Manufacturer=Kingston
S: Product=DataTraveler 2.0
S: SerialNumber=5B6B0992AA6A
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Also try unplugging the device and run the command again - the entries should disappear.

If you do not get this data then you may be advised to take a look at the kernel setup.


HOW DO I DUMP MY KERNEL SETUP?


My settings are:

SCSI device support, disk support and generic support (more of this later) Then various obvious settings in USB device support.

< > RAID Transport Class
 
Old 08-26-2007, 11:26 AM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
I usually open a terminal window and monitor the messages log file when I plug in the device to see how the system detects it..

Code:
[root@localhost ~]# tail -f /var/log/messages
Aug 26 04:04:58 localhost last message repeated 39 times
Aug 26 04:06:17 localhost last message repeated 3 times

Aug 26 04:17:12 localhost kernel: powernow-k8: failing targ, change pending bit set
Aug 26 12:22:17 localhost kernel: usb 5-8: new high speed USB device using ehci_ hcd and address 3
Aug 26 12:22:17 localhost kernel: usb 5-8: configuration #1 chosen from 1 choice
Aug 26 12:22:17 localhost kernel: scsi3 : SCSI emulation for USB Mass Storage de vices
Aug 26 12:22:22 localhost kernel:   Vendor: USB 2.0   Model: Flash Disk        R ev: 1100
Aug 26 12:22:22 localhost kernel:   Type:   Direct-Access                      A NSI SCSI revision: 00
Aug 26 12:22:22 localhost kernel: SCSI device sde: 3963904 512-byte hdwr sectors  (2030 MB)
Aug 26 12:22:22 localhost kernel: sde: Write Protect is off
Aug 26 12:22:22 localhost kernel: sde: assuming drive cache: write through
Aug 26 12:22:22 localhost kernel: SCSI device sde: 3963904 512-byte hdwr sectors  (2030 MB)
Aug 26 12:22:22 localhost kernel: sde: Write Protect is off
Aug 26 12:22:22 localhost kernel: sde: assuming drive cache: write through
Aug 26 12:22:22 localhost kernel:  sde: sde1
Aug 26 12:22:22 localhost kernel: sd 3:0:0:0: Attached scsi removable disk sde
Aug 26 12:22:22 localhost kernel: sd 3:0:0:0: Attached scsi generic sg4 type 0
Aug 26 12:22:23 localhost kernel: SELinux: initialized (dev sde1, type vfat), us es genfs_contexts
Aug 26 12:22:23 localhost hald: mounted /dev/sde1 on behalf of uid 500
in this example you can see the usb drive was detected as /dev/sde

is your system detecting the drive properly according to this log file ?
 
Old 08-26-2007, 02:49 PM   #6
ddlawrence
LQ Newbie
 
Registered: Aug 2007
Location: Vancouver Island, Canada
Distribution: Fedora Core
Posts: 24

Original Poster
Rep: Reputation: 16
usb mounts ok now

Thanks farslayer. That tail cmd works well and it can be handy for a lot of problems.
Funny, the dev name changed overnight from /dev/sdb1 to /dev/sda1.

regards..................don

Quote:
Originally Posted by farslayer View Post
I usually open a terminal window and monitor the messages log file when I plug in the device to see how the system detects it..

Code:
[root@localhost ~]# tail -f /var/log/messages
Aug 26 04:04:58 localhost last message repeated 39 times
Aug 26 04:06:17 localhost last message repeated 3 times

Aug 26 04:17:12 localhost kernel: powernow-k8: failing targ, change pending bit set
Aug 26 12:22:17 localhost kernel: usb 5-8: new high speed USB device using ehci_ hcd and address 3
Aug 26 12:22:17 localhost kernel: usb 5-8: configuration #1 chosen from 1 choice
Aug 26 12:22:17 localhost kernel: scsi3 : SCSI emulation for USB Mass Storage de vices
Aug 26 12:22:22 localhost kernel:   Vendor: USB 2.0   Model: Flash Disk        R ev: 1100
Aug 26 12:22:22 localhost kernel:   Type:   Direct-Access                      A NSI SCSI revision: 00
Aug 26 12:22:22 localhost kernel: SCSI device sde: 3963904 512-byte hdwr sectors  (2030 MB)
Aug 26 12:22:22 localhost kernel: sde: Write Protect is off
Aug 26 12:22:22 localhost kernel: sde: assuming drive cache: write through
Aug 26 12:22:22 localhost kernel: SCSI device sde: 3963904 512-byte hdwr sectors  (2030 MB)
Aug 26 12:22:22 localhost kernel: sde: Write Protect is off
Aug 26 12:22:22 localhost kernel: sde: assuming drive cache: write through
Aug 26 12:22:22 localhost kernel:  sde: sde1
Aug 26 12:22:22 localhost kernel: sd 3:0:0:0: Attached scsi removable disk sde
Aug 26 12:22:22 localhost kernel: sd 3:0:0:0: Attached scsi generic sg4 type 0
Aug 26 12:22:23 localhost kernel: SELinux: initialized (dev sde1, type vfat), us es genfs_contexts
Aug 26 12:22:23 localhost hald: mounted /dev/sde1 on behalf of uid 500
in this example you can see the usb drive was detected as /dev/sde

is your system detecting the drive properly according to this log file ?
 
Old 08-26-2007, 06:38 PM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Glad that helped you get it all worked out..

Yes the device id changes depending on what is plugged in, and in what order..

if I plug in my usb flash drive first it's /dev/sdb

if I plug in my Memory card reader first it gets /dev/sdb /dev/sdc /dev/sdd and /dev/sde then if I plug in the USB Flash drive it becomes /dev/sdf...

If it really bothered me I could write some persistent rules for udev so the device ID would always be the same, but I don't find it annoying enough to worry about.

in case you are interested in writing rules for your system, heres a place you can start.
http://reactivated.net/writing_udev_rules.html
http://gentoo-wiki.com/HOWTO_Customizing_UDEV
 
Old 08-28-2007, 03:33 AM   #8
tp11235
Member
 
Registered: Feb 2005
Posts: 106
Blog Entries: 1

Rep: Reputation: 15
Glad it is all working.

I set up my kernel manually so I cd to /usr/src/linux (the "linux" is a system created symlink to the most recent source for the kernel).

Then I run

make menuconfig

This presents you with all the options for kernel setup. The extracts in my post were cut and paste from there - although that can be difficult because the CTRL-C to copy exits from menuconfig!

You can exit from this without making changes to the configuration for compiling the kernel and this is not the step that recompiles the kernel so it is fairly safe to have a look around. Just remember to exit at the end without saving changes.

A key bit of advice (from personal experience!!) is to avoid getting too confident that you know what is going on in the kernel. I started on some optimization work - getting rid of options I thought I did not need - and ended up with a full reinstall. This is especially true in the graphics area and with filesystem support. Think very carefully and make sure you understand how to create and use a rescue kernel in your bootloader before you go down this route. Or perhaps don't go down it at all!!

Cheers

Tim.
 
Old 09-21-2007, 05:48 PM   #9
ddlawrence
LQ Newbie
 
Registered: Aug 2007
Location: Vancouver Island, Canada
Distribution: Fedora Core
Posts: 24

Original Poster
Rep: Reputation: 16
Thanks again Farslayer & Tim. I will follow up on your last bit of advice.
My memorystick works OK now, but there is a new twist.
The other user here at work gets "permission denied"
when he uses his memory stick. I know this can be fixed, probably in /etc/fstab
The "Running Linux" book I just bought doesn't have it (old book).

regards & keep the faith................don
 
Old 10-01-2007, 03:05 PM   #10
tp11235
Member
 
Registered: Feb 2005
Posts: 106
Blog Entries: 1

Rep: Reputation: 15
Have a look at fstab - have you got the option "user" set on the line for /dev/sd* ... or whatever is mounting your memory stick. It is not set on my USB drive because I use it backups and I don't want anybody else getting at it. Page 166 of Running Linux might be helpful. But it if fair to say that 1999 is a bit old for memory sticks!!

Tim.
 
  


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
need help troubleshooting connection benoit808 Linux - Wireless Networking 11 02-22-2007 01:34 AM
Troubleshooting Sound carlosinfl Linux - General 6 09-06-2006 09:48 AM
troubleshooting how-to? chilehead Linux - Hardware 2 02-06-2005 04:58 PM
NVU troubleshooting aeruzcar Linux - Software 0 07-27-2004 02:02 PM
Installation Troubleshooting Lucifa Linux - General 5 06-15-2002 11:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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