LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-16-2007, 12:09 PM   #1
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Problems mounting USB memory stick


Hello,

I'm using a Linux system with kernel version 2.6.9. I am attempting to mount a USB memory stick, yet I am having problems doing so. The mem stick is detected and its built-in LED is active.

I hope the information below will help to analyze the problem I am having:

I ran the following:

# modprobe usb-storage
# modprobe uhci-hcd
# mkdir /mnt/usb

And then the script:

Code:
#!/bin/sh

TYPE=vfat

for dev in sda sdb sdc sdd sde
do
        for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
        do
                mount -t $TYPE /dev/$dev$i /mnt/usb

                if [ $? = 0 ]; then
                        echo "USB stick is mount at /mnt/usb"
                        exit 0
                fi
        done
done

exit 1
In each mount attempt I got an error similar to the following:

Code:
mount: Mounting /dev/sda1 on /mnt/usb failed: No such device
I've also tried changing the TYPE to 'auto', but that also failed.

Here's the output from running 'dmesg':

PHP Code:
usb 1-1:1.0hotplug
usb 1
-1unregistering device
usb 1
-1hotplug
usb usb1
usb_disable_device nuking all URBs
usb usb1
unregistering interface 1-0:1.0
usb 1
-0:1.0hotplug
usb usb1
unregistering device
usb usb1
hotplug
uhci_hcd 0000
:00:07.2USB bus 1 deregistered
USB Universal Host Controller 
Interface driver v2.2
uhci_hcd 0000
:00:07.2Intel Corp82371AB/EB/MB PIIX4 USB
uhci_hcd 0000
:00:07.2: new USB bus registeredassigned bus number 1
usb usb1
: new device stringsMfr=3Product=2SerialNumber=1
usb usb1
: default language 0x0409
usb usb1
ProductIntel Corp82371AB/EB/MB PIIX4 USB
usb usb1
ManufacturerLinux 2.6.9 uhci_hcd
usb usb1
SerialNumber0000:00:07.2
usb usb1
hotplug
usb usb1
adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0hotplug
hub 1
-0:1.0usb_probe_interface
hub 1
-0:1.0usb_probe_interface got id
hub 1
-0:1.0USB hub found
hub 1
-0:1.0no power switching (usb 1.0)
usb 1-1: new full speed USB device using address 2
usb 1
-1: new device stringsMfr=1Product=2SerialNumber=3
usb 1
-1: default language 0x0409
usb 1
-1ProductCruzer Mini
usb 1
-1ManufacturerSanDisk Corporation
usb 1
-1SerialNumberSNDK9CE4141900A07906
usb 1
-1hotplug
usb 1
-1adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0hotplug
usb
-storage 1-1:1.0usb_probe_interface
usb
-storage 1-1:1.0usb_probe_interface got id
usb
-storageUSB Mass Storage device detected
usb
-storage: -- associate_dev
usb
-storageVendor0x0781Product0x5150Revision0x0020
usb
-storage: Interface Subclass0x06Protocol0x50
usb
-storageVendorSanDisk Corporation,  ProductCruzer Mini
usb
-storageTransportBulk
usb
-storageProtocolTransparent SCSI
usb
-storageusb_stor_control_msgrq=fe rqtype=a1 value=0000 index=00 len=1
usb
-storageGetMaxLUN command result is 1data is 0
usb
-storage: *** thread sleeping.
scsi2 SCSI emulation for USB Mass Storage devices
usb
-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageCommand INQUIRY (6 bytes)
usb-storage:  12 00 00 00 24 00
usb
-storageBulk Command S 0x43425355 T 0x13 L 36 F 128 Trg 0 LUN 0 CL 6
usb
-storageusb_stor_bulk_transfer_bufxfer 31 bytes
usb
-storageStatus code 0transferred 31/31
usb
-storage: -- transfer complete
usb
-storageBulk command transfer result=0
usb
-storageusb_stor_bulk_transfer_bufxfer 36 bytes
usb
-storageStatus code 0transferred 36/36
usb
-storage: -- transfer complete
usb
-storageBulk data transfer result 0x0
usb
-storageAttempting to get CSW...
usb-storageusb_stor_bulk_transfer_bufxfer 13 bytes
usb
-storageStatus code 0transferred 13/13
usb
-storage: -- transfer complete
usb
-storageBulk status result 0
usb
-storageBulk Status S 0x53425355 T 0x13 R 0 Stat 0x0
usb
-storagescsi cmd doneresult=0x0
usb
-storage: *** thread sleeping.
usb-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageBad LUN (0:1)
usb-storagescsi cmd doneresult=0x40000
usb
-storage: *** thread sleeping.
usb-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageBad target number (1:0)
usb-storagescsi cmd doneresult=0x40000
usb
-storage: *** thread sleeping.
usb-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageBad target number (2:0)
usb-storagescsi cmd doneresult=0x40000
usb
-storage: *** thread sleeping.
usb-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageBad target number (3:0)
usb-storagescsi cmd doneresult=0x40000
usb
-storage: *** thread sleeping.
usb-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageBad target number (4:0)
usb-storagescsi cmd doneresult=0x40000
usb
-storage: *** thread sleeping.
usb-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageBad target number (5:0)
usb-storagescsi cmd doneresult=0x40000
usb
-storage: *** thread sleeping.
usb-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageBad target number (6:0)
usb-storagescsi cmd doneresult=0x40000
usb
-storage: *** thread sleeping.
usb-storagequeuecommand called
usb
-storage: *** thread awakened.
usb-storageBad target number (7:0)
usb-storagescsi cmd doneresult=0x40000
usb
-storage: *** thread sleeping.
USB Mass Storage device found at 2 
Can someone help me resolve this issue?

Thank you.
 
Old 08-16-2007, 07:06 PM   #2
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Original Poster
Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
I came up with a solution. I followed the instructions on the following page at http://www.linuxquestions.org/linux/...d_Reader_HowTo

But one final thing I had to do to successfully mount my USB mem-stick was to load the vfat and nls_cp437 modules. Btw, my fstab entry looks like:

Code:
/dev/sda1   /mnt/usb   auto   rw,noauto   0   0
Question... Since I am building a Linux distro that can could potentially accept any USB mem-stick, should I build into the kernel all of the "Native Language Support" modules, or is there a better way to select the appropriate NLS module?

Last edited by dwhitney67; 08-16-2007 at 07:19 PM.
 
Old 08-18-2007, 12:38 AM   #3
kujirasan
Member
 
Registered: Mar 2007
Posts: 168

Rep: Reputation: 19
To successfully mount a USB device and in particular a stick, it should read and write, my suggestion is use a higher kernel, and then build your distro, 2.6.22.2 somewhere there.
 
  


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
USB memory, Compact Flash, Memory Stick energiza Linux - Hardware 2 08-22-2006 09:29 PM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 05:39 PM
USB memory stick mounting gangaraju Fedora 2 01-03-2006 07:07 AM
Suse 9.1 USB stick Mounting problems 777 Linux - Newbie 3 11-03-2004 12:04 AM
Mounting USB 2.0 JetFlash memory stick causes hang detly Linux - Hardware 7 05-25-2004 02:33 AM

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

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