Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
#!/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.0: hotplug usb 1-1: unregistering device usb 1-1: hotplug usb usb1: usb_disable_device nuking all URBs usb usb1: unregistering interface 1-0:1.0 usb 1-0:1.0: hotplug usb usb1: unregistering device usb usb1: hotplug uhci_hcd 0000:00:07.2: USB bus 1 deregistered USB Universal Host Controller Interface driver v2.2 uhci_hcd 0000:00:07.2: Intel Corp. 82371AB/EB/MB PIIX4 USB uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1 usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: default language 0x0409 usb usb1: Product: Intel Corp. 82371AB/EB/MB PIIX4 USB usb usb1: Manufacturer: Linux 2.6.9 uhci_hcd usb usb1: SerialNumber: 0000:00:07.2 usb usb1: hotplug usb usb1: adding 1-0:1.0 (config #1, interface 0) usb 1-0:1.0: hotplug hub 1-0:1.0: usb_probe_interface hub 1-0:1.0: usb_probe_interface - got id hub 1-0:1.0: USB hub found hub 1-0:1.0: no power switching (usb 1.0) usb 1-1: new full speed USB device using address 2 usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: default language 0x0409 usb 1-1: Product: Cruzer Mini usb 1-1: Manufacturer: SanDisk Corporation usb 1-1: SerialNumber: SNDK9CE4141900A07906 usb 1-1: hotplug usb 1-1: adding 1-1:1.0 (config #1, interface 0) usb 1-1:1.0: hotplug usb-storage 1-1:1.0: usb_probe_interface usb-storage 1-1:1.0: usb_probe_interface - got id usb-storage: USB Mass Storage device detected usb-storage: -- associate_dev usb-storage: Vendor: 0x0781, Product: 0x5150, Revision: 0x0020 usb-storage: Interface Subclass: 0x06, Protocol: 0x50 usb-storage: Vendor: SanDisk Corporation, Product: Cruzer Mini usb-storage: Transport: Bulk usb-storage: Protocol: Transparent SCSI usb-storage: usb_stor_control_msg: rq=fe rqtype=a1 value=0000 index=00 len=1 usb-storage: GetMaxLUN command result is 1, data is 0 usb-storage: *** thread sleeping. scsi2 : SCSI emulation for USB Mass Storage devices usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Command INQUIRY (6 bytes) usb-storage: 12 00 00 00 24 00 usb-storage: Bulk Command S 0x43425355 T 0x13 L 36 F 128 Trg 0 LUN 0 CL 6 usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes usb-storage: Status code 0; transferred 31/31 usb-storage: -- transfer complete usb-storage: Bulk command transfer result=0 usb-storage: usb_stor_bulk_transfer_buf: xfer 36 bytes usb-storage: Status code 0; transferred 36/36 usb-storage: -- transfer complete usb-storage: Bulk data transfer result 0x0 usb-storage: Attempting to get CSW... usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes usb-storage: Status code 0; transferred 13/13 usb-storage: -- transfer complete usb-storage: Bulk status result = 0 usb-storage: Bulk Status S 0x53425355 T 0x13 R 0 Stat 0x0 usb-storage: scsi cmd done, result=0x0 usb-storage: *** thread sleeping. usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Bad LUN (0:1) usb-storage: scsi cmd done, result=0x40000 usb-storage: *** thread sleeping. usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Bad target number (1:0) usb-storage: scsi cmd done, result=0x40000 usb-storage: *** thread sleeping. usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Bad target number (2:0) usb-storage: scsi cmd done, result=0x40000 usb-storage: *** thread sleeping. usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Bad target number (3:0) usb-storage: scsi cmd done, result=0x40000 usb-storage: *** thread sleeping. usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Bad target number (4:0) usb-storage: scsi cmd done, result=0x40000 usb-storage: *** thread sleeping. usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Bad target number (5:0) usb-storage: scsi cmd done, result=0x40000 usb-storage: *** thread sleeping. usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Bad target number (6:0) usb-storage: scsi cmd done, result=0x40000 usb-storage: *** thread sleeping. usb-storage: queuecommand called usb-storage: *** thread awakened. usb-storage: Bad target number (7:0) usb-storage: scsi cmd done, result=0x40000 usb-storage: *** thread sleeping. USB Mass Storage device found at 2
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.