# Having trouble mounting USB drive

## Cubano

I'm running a 2.6.9 kernel with I believe the suffcient kernel optioons enabled for USB mounting.

Here's some information:

bash-2.05b# uname -a

Linux baddabing 2.6.9 #4 Wed Feb 23 21:00:10 UTC 2005 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz GenuineIntel GNU/Linux

I attach my USB drive:

bash-2.05b# dmesg | grep Attache

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

bash-2.05b# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1   *           1          13      104391   83  Linux

/dev/hda2              14          76      506047+  82  Linux swap / Solaris

/dev/hda3              77        1901    14659312+  83  Linux

/dev/hda4            1902        9729    62878410    5  Extended

/dev/hda5            1902        9729    62878378+  8e  Linux LVM

Disk /dev/sda: 40.0 GB, 40060403712 bytes

255 heads, 63 sectors/track, 4870 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1               1        4870    39118243+   c  W95 FAT32 (LBA)

bash-2.05b# more /proc/scsi/scsi

Attached devices:

Host: scsi0 Channel: 00 Id: 00 Lun: 00

  Vendor: SAMSUNG  Model: MP0402H          Rev: UC10

  Type:   Direct-Access                    ANSI SCSI revision: 02

So far it looks good. Right?

But

bash-2.05b# mount -t vfat /dev/sda1 /mnt/flashtrax/

mount: /dev/sda1 is not a block device

Any suggestions?

Thanks.

----------

## shadow255

The only thing you gave no mention to in your thorough going-over is whether you have support for VFAT in your kernel.  Make sure that you have it selected before going any further!

----------

## Cubano

Where is this set?

----------

## Cubano

yes it is:

    < > ROM file system support                                    

    [ ] Quota support                                        

    < > Kernel automounter support                  

   <*> Kernel automounter version 4 support (also supports v3)

          CD-ROM/DVD Filesystems  --->                               

          DOS/FAT/NT Filesystems  --->                                 

          Pseudo filesystems  --->                                     

          Miscellaneous filesystems  --->                            

          Network File Systems  --->                                  

          Partition Types  --->  

   <*> MSDOS fs support                                 

             <*> VFAT (Windows-95) fs support               

             (437) Default codepage for FAT                   

             (iso8859-1) Default iocharset for FAT            

             <*> NTFS file system support                     

             [ ]   NTFS debugging support                                          

             [*]   NTFS write support     

Correct?

----------

## Cubano

How about Low Peformance USB Block driver?

Does this need enabling?

----------

## Cubano

ok, I guess not:

Beware the Low Performance USB Block Driver

If your USB disk is shown as /dev/ub/a then you're using the low Performance USB Block Driver (Device Drivers -> Block Devices -> Low Performance USB Block Driver). You will find that your transfer speed is crippled by this driver. Disable it and use the usb-storage module (devices > usb) instead.

http://gentoo-wiki.com/HOWTO_USB_Mass_Storage_Device

----------

## shadow255

Okay, let's approach from a different direction.  How have you used this USB drive in the past?  Does it have files on it that you care about?  If not, you might consider recreating the filesystem.  Another thing you could try is emerging sys-fs/dosfstools and using dosfsck to check the filesystem.  You'll need dosfstools anyway if you intend to recreate the vfat filesystem, so that's probably the first thing you should do if you want to get it working with your Gentoo box.

If you've been using the drive with a different computer and have files on it that you care about, however, your first step should be to back those files up on the other computer.  Then you should feel free to blast away with dosfsck and/or mkdosfs to your heart's content  :Wink: 

----------

## Cubano

Strangely it was working at some stage then it stopped the only thing that changed was the kernel - numerous rebuild have happened.

I can't recreate the filesystenm though since the disk has loads of valuable photos and stuff.

I'm emerging the dostools though. I'll let you know how it goes.

----------

## stager

Warning: Low Peformance USB Block driver option will screw up your usb driver.  :Shocked: 

Since it looks like verything else in your kernel is in order I would recomend looking at this option in your kernel and if does not work then plug in your usb drive and post the end section of dmesg so I can tell why its not working. If you get an error like is08895-1 not found then you know what the problem is. In your kernel config you have to have the iso8859-1 enabled in | File Systems> Native Language Support |

<*>   NLS ISO 8859-1  (Latin 1; Western European Languages)    

*****************THIS IS LOCATED NEAR THE BOTTOM OF THE PAGE NOT AT THE TOP THE REASON I SAY THIS IS CAUSE IT MIXED ME UP ****************************

&

(iso8859-1) Default NLS Option                                  <------------- At the top of the page  make sure it is the same as the one above                         

<*>   Codepage 437 (United States, Canada)              

That should do it. 

Oh and here is my USB options in the kernel  just for the sake of reference. And HCD support is imortant....read somewhere

  │ │           <*> Support for Host-side USB                                                                                                         

  │ │           [ ]   USB verbose debug messages                                                                                                      

  │ │           ---   Miscellaneous USB options                                                                                                       

  │ │           [*]   USB device filesystem                                                                                                           

  │ │           [ ]   Enforce USB bandwidth allocation (EXPERIMENTAL)                                                                                 

  │ │           [ ]   Dynamic USB minor allocation (EXPERIMENTAL)                                                                                     

  │ │           [ ]   USB suspend/resume (EXPERIMENTAL)                                                                                               

  │ │           --- USB Host Controller Drivers                                                                                                       

  │ │           <*> EHCI HCD (USB 2.0) support                                                                                                        

  │ │           [ ]   Full speed ISO transactions (EXPERIMENTAL)                                                                                      

  │ │           [ ]   Root Hub Transaction Translators (EXPERIMENTAL)                                                                                 

  │ │           <*> OHCI HCD support                                                                                                                 

  │ │           <*> UHCI HCD (most Intel and VIA) support                                                                                            

  │ │           <*> SL811HS HCD support                                                                                                               

  │ │           --- USB Device Class drivers                                                                                                          

  │ │           <*> USB Audio support                                                                                                                 

  │ │           < > USB Bluetooth TTY support                                                                                                         

  │ │           < > USB MIDI support                                                                                                                  

  │ │           < > 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                                                                                                  

  │ │           [ ]   USB Mass Storage Write-Protected Media Detection (EXPERIMENTAL)                                                                 

  │ │           [*]   Datafab Compact Flash Reader support (EXPERIMENTAL)                                                                             

  │ │           [*]   Freecom USB/ATAPI Bridge support                                                                                                

  │ │           [*]   ISD-200 USB/ATA Bridge support                                                                                                  

  │ │           [*]   Microtech/ZiO! CompactFlash/SmartMedia support                                                                                  

  │ │           [ ]   HP CD-Writer 82xx support (EXPERIMENTAL)                                                                                        

  │ │           [*]   SanDisk SDDR-09 (and other SmartMedia) support (EXPERIMENTAL)                                                                 

  │ │           [*]   SanDisk SDDR-55 SmartMedia support (EXPERIMENTAL)                                                                               

  │ │           [*]   Lexar Jumpshot Compact Flash Reader (EXPERIMENTAL)                                                                            

  │ │           --- USB Input Devices                                                                                                                 

  │ │           <*> USB Human Interface Device (full HID) support                                                                                     

  │ │           [*]   HID input layer support                                                                                                         

  │ │           [ ]     Force feedback support (EXPERIMENTAL)                                                                                         

  │ │           [ ]   /dev/hiddev raw HID device support                                                                                             

  │ │           < > Aiptek 6000U/8000U tablet support                                                                                                 

  │ │           < > Wacom Intuos/Graphire tablet support                                                                                              

  │ │           < > KB Gear JamStudio tablet support                                                                                                  

  │ │           < > Griffin PowerMate and Contour Jog support                                                                                         

  │ │           < > MicroTouch USB Touchscreen Driver                                                                                                 

  │ │           < > eGalax TouchKit USB Touchscreen Driver                                                                                            

  │ │           < > X-Box gamepad support                                                                                                             

  │ │           < > ATI / X10 USB RF remote control                                                                                                   

  │ │           --- USB Imaging devices

----------

## Cubano

Thanks for the config I have enabled all other options that you had enabled recompiled and rebooted.

I plugin the usb driver and get:

usb 1-6: new high speed USB device using address 2

usb-storage: USB Mass Storage device detected

usb-storage: -- associate_dev

usb-storage: Vendor: 0x0917, Product: 0x0204, Revision: 0x0100

usb-storage: Interface Subclass: 0x06, Protocol: 0x50

usb-storage: Vendor: Smart Disk,  Product: USB Storage Adapter

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.

scsi0 : 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 0x1 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

But still:

bash-2.05b#

bash-2.05b#

bash-2.05b# mount -t vfat /dev/sda1 /mnt/flashtrax

mount: /dev/sda1 is not a block device

bash-2.05b#

----------

## stager

You should make sure you have the devfsd if your using 2.6 and also udev need to be installed or try re-installing them. Cause your dmesg looks good... no errors that I can see.

Cheers Ryan

----------

## Cubano

bash-2.05b# emerge  devfsd --search

Searching...

[ Results for search key : devfsd ]

[ Applications found : 1 ]

*  sys-fs/devfsd

      Latest version available: 1.3.25-r8

      Latest version installed: 1.3.25-r8

      Size of downloaded files: 41 kB

      Homepage:    http://www.atnf.csiro.au/~rgooch/linux/

      Description: Daemon for the Linux Device Filesystem

      License:     GPL-2

----------

## stager

Ok well I just got on my Gentoo box pluged in my USB drive to see what my dmesg looked like:

My guess is you either dont have the right scsi options enabled in your kernel(Which I have listed my scsi options for you to look at) or udev or hotplug needs to be installed/re-installed.

*****SCSI OPTIONS IN KERNEL CONF*************

```

 --- 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                                                                                

  │ │                                        [ ]     Enable vendor-specific extensions (for SCSI CDROM)                                              

  │ │                                        <*>   SCSI generic support                                               

```

**********MY DMESG AFTER USB DRIVE PLUGED IN*******************

```

usb-storage: USB Mass Storage device detected

usb-storage: -- associate_dev

usb-storage: Vendor: 0x0483, Product: 0x1307, Revision: 0x0131

usb-storage: Interface Subclass: 0x06, Protocol: 0x50

usb-storage: Vendor: Stormblue Co., Ltd.,  Product: USB Mass Storage Device

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.

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

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 0x1 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 0x1 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

  Vendor: USB Mass  Model:  Storage Device   Rev:

  Type:   Direct-Access                      ANSI SCSI revision: 02

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x2 L 0 F 0 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: 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 0x2 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: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x3 L 8 F 128 Trg 0 LUN 0 CL 10

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 8 bytes

usb-storage: Status code 0; transferred 8/8

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 0x3 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

SCSI device sda: 128000 512-byte hdwr sectors (66 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x4 L 0 F 0 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: 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 0x4 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: Command ALLOW_MEDIUM_REMOVAL (6 bytes)

usb-storage:  1e 00 00 00 01 00

usb-storage: Bulk Command S 0x43425355 T 0x5 L 0 F 0 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: 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 0x5 R 0 Stat 0x1

usb-storage: -- transport indicates command failure

usb-storage: Issuing auto-REQUEST_SENSE

usb-storage: Bulk Command S 0x43425355 T 0x80000005 L 18 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 18 bytes

usb-storage: Status code 0; transferred 18/18

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 0x80000005 R 0 Stat 0x0

usb-storage: -- Result from auto-sense is 0

usb-storage: -- code: 0x70, key: 0x0, ASC: 0x0, ASCQ: 0x0

usb-storage: No Sense: No additional sense information

usb-storage: scsi cmd done, result=0x2

usb-storage: *** thread sleeping.

SCSI error: host 0 id 0 lun 0 return code = 8000002

        Sense class 7, sense error 0, extended sense 0

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x6 L 0 F 0 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: 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 0x6 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: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x7 L 8 F 128 Trg 0 LUN 0 CL 10

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 8 bytes

usb-storage: Status code 0; transferred 8/8

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 0x7 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

SCSI device sda: 128000 512-byte hdwr sectors (66 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0:<7>usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_10 (10 bytes)

usb-storage:  28 00 00 00 00 00 00 00 08 00

usb-storage: Bulk Command S 0x43425355 T 0x8 L 4096 F 128 Trg 0 LUN 0 CL 10

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_sglist: xfer 4096 bytes, 1 entries

usb-storage: Status code 0; transferred 4096/4096

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 0x8 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

 p1

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)

usb-storage:  1e 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x9 L 0 F 0 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: 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 0x9 R 0 Stat 0x1

usb-storage: -- transport indicates command failure

usb-storage: Issuing auto-REQUEST_SENSE

usb-storage: Bulk Command S 0x43425355 T 0x80000009 L 18 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 18 bytes

usb-storage: Status code 0; transferred 18/18

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 0x80000009 R 0 Stat 0x0

usb-storage: -- Result from auto-sense is 0

usb-storage: -- code: 0x70, key: 0x0, ASC: 0x0, ASCQ: 0x0

usb-storage: No Sense: No additional sense information

usb-storage: scsi cmd done, result=0x2

usb-storage: *** thread sleeping.

SCSI error: host 0 id 0 lun 0 return code = 8000002

        Sense class 7, sense error 0, extended sense 0

Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

```

----------

## Cubano

I had all but one SCSI options the same (SCSI generic support I changed from M to *, recompiled and rebooted with updated kernel)

When I plugin device I get these lines:

usb 1-6: new high speed USB device using address 2

usb-storage: USB Mass Storage device detected

usb-storage: -- associate_dev

usb-storage: Vendor: 0x0917, Product: 0x0204, Revision: 0x0100

usb-storage: Interface Subclass: 0x06, Protocol: 0x50

usb-storage: Vendor: Smart Disk,  Product: USB Storage Adapter

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.

scsi0 : 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 0x1 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 0x1 R 0 Stat 0x0

usb-storage: Fixing INQUIRY data to show SCSI rev 2 - was 0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

  Vendor: SAMSUNG   Model: MP0402H           Rev: UC10

  Type:   Direct-Access                      ANSI SCSI revision: 02

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x2 L 0 F 0 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: 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 0x2 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: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x3 L 8 F 128 Trg 0 LUN 0 CL 10

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 8 bytes

usb-storage: Status code 0; transferred 8/8

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 0x3 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

SCSI device sda: 78242976 512-byte hdwr sectors (40060 MB)

sda: assuming drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0:<7>usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_10 (10 bytes)

usb-storage:  28 00 00 00 00 00 00 00 08 00

usb-storage: Bulk Command S 0x43425355 T 0x4 L 4096 F 128 Trg 0 LUN 0 CL 10

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_sglist: xfer 4096 bytes, 1 entries

usb-storage: Status code 0; transferred 4096/4096

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 0x4 R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

 p1

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

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

Looks good to me - might unmerge and them emerge hotplug.

----------

## stager

Looks like you got somewhere with the dmesg now, but i dont see it attaching your device at the end of your dmesg. I recomend looking at this "udev how to" to fix your problem. http://www.gentoo.org/doc/en/udev-guide.xml. If you have devfs installed aswell read this How to migrate to udev from devfs. http://gentoo-wiki.com/HOWTO_Migrate_to_UDEVLast edited by stager on Sun Feb 27, 2005 5:07 pm; edited 1 time in total

----------

## Cubano

Hmmmm

I did the following:

emerge udev 

It wasn't installed

emerge unmerge hotplug

emerge hotplug

rebooted

X wouldn't start when using udev during boot and the machine froze.

I unmerged udev and rebooted and its ok now.

Note - I did have this usb drive working on Windows (friends machine) earlier today. I also had the driver mounted fine a month or so ago before rebuilding the kernel.

----------

## southerngentooman

 *Quote:*   

> X wouldn't start when using udev during boot and the machine froze.
> 
> I unmerged udev and rebooted and its ok now.
> 
> 

 

I recently had a similar problem.   Check xorg.conf for your mouse settings.  I had to change mine to from /dev/mouse to /dev/mice and then x ran fine.

Sounds like you need to write a udev rule for your usb drive, then it should work fine.  Use a symbolic link for NAME that will link to your fstab, so you'll need to edit fstab also.

danny

----------

## southerngentooman

Also,

After you reinstall udev and hotplug, check for this file:

ls /etc/hotplug/isapnp.rc

isapnp.rc is no longer used and must be removed it its there.

after that run this and post the output, and we can help further:

# udevinfo -p /sys/block/sda/sda1 -a

good luck,

danny

----------

## Mark Clegg

Your original post shows dmesg / fdisk -l listing  sda and sda1 so it looks like it's working to me.

What do you get doing

ls -l /dev/sda /dev/sda1

Should be...

brw-rw----  1 root disk 8, 0 Feb 12 00:27 /dev/sda

brw-rw----  1 root disk 8, 1 Feb 12 00:27 /dev/sda1

otherwise the device nodes are wrong and thats why you can't mount it. Failing that check the output of a 'p' command to fdisk /dev/sda

----------

## southerngentooman

 *Quote:*   

> What do you get doing
> 
> ls -l /dev/sda /dev/sda1
> 
> Should be...
> ...

 

Yea, well, he already indicated that mount is reporting that it's not a block device.  Probably its coming up as character device, crw****** or something similar.  A udev rule can fix that.

danny

----------

## Cubano

bash-2.05b$ ls -l /dev/sda /dev/sda1

ls: /dev/sda: No such file or directory

/dev/sda1:

total 0

bash-2.05b$

and:

bash-2.05b$ ls -la /dev/sda*

total 0

drwxr-xr-x  1 root root 0 Feb 27 17:00 .

drwxr-xr-x  1 root root 0 Jan  1  1970 ..

bash-2.05b$ ls -la /dev/sda /dev/sda1

ls: /dev/sda: No such file or directory

/dev/sda1:

total 0

drwxr-xr-x  1 root root 0 Feb 27 17:00 .

drwxr-xr-x  1 root root 0 Jan  1  1970 ..

bash-2.05b$

----------

## vberg

Hi!

isn't the USB-storage device in then /dev/ub/a or b and then /a/part1 for the partion 1 and so on.

I dont know if this is the right way to mount this.

but its works for me

```
mount /dev/ub/a/part1 /mnt/usb-disk1
```

----------

## Mark Clegg

Try

mknod /dev/sda b 8 0

mknod /dev/sda1 b 8 1

And trying the mount again.

----------

## Cubano

bash-2.05b# mount /dev/ub/a/part1 /mnt/flashtrax/

mount: special device /dev/ub/a/part1 does not exist

bash-2.05b# ls /dev/us*

/dev/usbmouse

/dev/usb:

bash-2.05b# ls /dev/usb/

bash-2.05b# ls /dev/usb/*

ls: /dev/usb/*: No such file or directory

bash-2.05b# mount -t vfat /dev/usb/ /mnt/flashtrax/

mount: /dev/usb/ is not a block device

bash-2.05b#

----------

## Cubano

Would some one be able to post their ls-l for /dev/sda* ?

Thanks.

----------

## southerngentooman

```
danny danny # ls -l /dev/sda*

brw-rw----  1 root disk 8, 0 Feb 28 20:33 /dev/sda

brw-rw----  1 root disk 8, 1 Feb 28 20:33 /dev/sda1
```

But  I'm using udev.  If you don't want to install udev, you might consider installing kernel 2.4.xx.  I think it has better devfs support.

danny

----------

## southerngentooman

One more thought,

You might try adding 'auto' to your fstab options for the drive and see if the boot up init files can mount your drive.  You'd have to reboot to use it, but might be better than nothing.

danny

----------

## Cubano

Nah not surprisingly this makes no difference.

I ran a test and booted from Gentoo live cd then I was able to mount the device no problem.

----------

## Cubano

OK. Something strange happening with the /dev/sda1 device.

Firstly I deleted all /devsda devices

rm /dev/sda*

I then recreated using:

mknod /dev/sda  b 8 0

mknod /dev/sda1  b 8 1

mknod /dev/sda2  b 8 2

I could then run successfully:

mount -t vfat /dev/sda1 /mnt/flashtrax

and browse /mnt/flashtrax

I then rebooted however it does not allow me to mount the device until I delete the device and recreate it as above.

```
bash-2.05b# ls -l /dev/sda*

brw-r-----  1 root root 8, 0 Mar  1 19:51 /dev/sda

brw-r-----  1 root root 8, 2 Mar  1 19:51 /dev/sda2

/dev/sda1:

total 0

bash-2.05b# rm /devsda1

rm: cannot remove `/devsda1': No such file or directory

bash-2.05b# rm /dev/sda1

rm: cannot remove `/dev/sda1': Is a directory

bash-2.05b# rm -R /dev/sda1

bash-2.05b#   mknod /dev/sda1  b 8 1

bash-2.05b# ls /mnt/flashtrax

Temporary Items  Tutorial  canada  egypt  films  hawaii  morocco  music  zineb

bash-2.05b#   mknod /dev/sda  b 8 0

```

No I have the following:

```
bash-2.05b# ls -l /dev/sda*

brw-r-----  1 root root 8, 0 Mar  1 19:51 /dev/sda

brw-r--r--  1 root root 8, 1 Mar  1 19:54 /dev/sda1

brw-r-----  1 root root 8, 2 Mar  1 19:51 /dev/sda2

bash-2.05b#

```

Why is /dev/sda1 becoming like a directory ?!

/dev/sda1:

total 0

----------

## Cubano

I'm not sure whether this might hold any clues but here is my grub.conf:

```

default 0

timeout=0

splashimage=(hd0,0)/boot/grub/splash.xdm.gz

title=Gentoo Linux 2.6.9

root (hd0,0)

kernel /kernel-2.6.9 root=/dev/hda3 video=vesafb:ywrap,pmipal,1024x768-32@60 spl

ash=silent,theme:emergence

append = "psmouse.proto=bare"

bash-2.05b$

```

----------

## southerngentooman

 *Quote:*   

> I ran a test and booted from Gentoo live cd then I was able to mount the device no problem.

 

I think this is telling.  My understanding is that devfs in the later 2.6.x releases has been intentionally crippled.  Most notable, lots of usb block devices never seem to work without implementing udev rules.  The whole issue with devfs is the never ending spiraling out of control number of new devices being manufactored that implement some sort of block memory structure that can be accessed by a file system.  There are so many different devices, it got to be a nightmare to manage the devfs data blocks for all this stuff.  So, some common hardware like mice and keyboards are still supported, but even that will end in the very near future.  With udev, hotplug and or coldplug is used to probe these devices and turn over sufficient data to udev for udev to be able to interface the common drivers.  However, except for some common devices, having all the rules to do this would be the same problem as with devfs.  Instead, udev provides some administrator tools that can be used to querry the hardware, and rather than needing special manufactor provided drivers, there is a fairly simple method of translating querry data into a usable interface.  To some extent, this can be automated and I suspect that as udev matures,  we will eventually see these rule written by another program.  But until then,  the system administrator needs to provide udev with the right 'keys' and link those keys to the file system via a custom udev rule.  The down side is, udev is a bit different, so some programs like X11 and others will need to be updated to work better with udev.  Udev actually works fine with X11, but the configuration scripts and programs out there right now were designed for devfs, so it is not unusual for the administrator to also have to reconfigure some other things.  Typically, fstab has to be written differently and there are some other little configuration things like /dev/input/mice to make x11 work.  Currently, most of our devices are initialize during boot up, and those init files don't necessarily have to be concerned with udev rules, but that will likely change also as devfs is completely eliminated from linux.  So I guess what I'm trying to say is that the LiveCD is older technology that does not need custom udev rules.   So, I really think udev can solve your problem with 2.6.9. You have all the indications there that tell me udev will work, it just needs to be told how to tie it together, something it is not capable of doing on its own.  I will gladly help you write your udev rule.  It's not that difficult,  just different.  But of course, you'd have to install udev, hotplug, and baselayout and run the querries on your hardware.  So my recommendation is:

build kernel without devfs support.

# emerge -a udev

# emerge -a baselayout

# emerge -a module-init-tools

# emerge -a hotplug

If you want the drive to be mounted at bootup, then also emerge coldplug.

nano -w /etc/X11/xorg.conf

change /dev/mouse to /dev/input/mice

nano -w /etc/conf.d/rc

RC_DEVICES="udev"

RC_DEVICE_TARBALL="yes"

RC_DEVFSD_STARTUP="no"    #because we already know that it don't work for you

# rc-update add hotplug default && modules-update

# rm /etc/hotplug/isapnp.rc

# udevinfo -p /sys/block/sda/sda1 -a

and then post the output of that last command here, and we can figure out your udev rule and fstab line.

Danny

----------

## daj

 *Cubano wrote:*   

> I'm running a 2.6.9 kernel with I believe the suffcient kernel optioons enabled for USB mounting.
> 
> <snip>
> 
> bash-2.05b# mount -t vfat /dev/sda1 /mnt/flashtrax/
> ...

 

and later

 *Quote:*   

> Strangely it was working at some stage then it stopped the only thing that changed was the kernel - numerous rebuild have happened. 

 

I had exactly the same thing happening. My USB device (devices, actually) mounted perfectly on this system. I upgraded the kernel from 2.6.8 to 2.6.10 (with pretty-much the same configuration - using make oldconfig) and could no longer mount a USB device, though dmesg and fdisk -l showed the device(s) and filesystems being recognized correctly.

Afterseveral hours of thought, Googling, and trial&error I realized that there was an actual directory called /dev/sda1 -- where it came from I don't know -- and this was blocking the creation of the SCSI emulation of the USB device. /dev/sda was being created (as a link to scsi/host3/bus0/target0/lun0/disc) but /dev/sda1 was not.

I deleted the directory (with no device attached) and tried again, and it worked.

It's should have been pretty obvious from the fact that dmesg showed the device being recognized, and fdisk -l showed it correctly that thehardware and  low-level drivers were all working correctly -- it just took a little thought to discover where else things might be going wrong.

The interesting -- and still unanswered -- question is where that /dev/sda1 directory came from in the first place?

-- 

Daj.

----------

## jpnag

I can't read my from my USB pen...no ideia why tho any help would be nice!

output from #dmesg

 *Quote:*   

> 
> 
> usb 1-1: new full speed USB device using uhci_hcd and address 7
> 
> scsi5 : SCSI emulation for USB Mass Storage devices
> ...

 

output from #fdisk -l

 *Quote:*   

> 
> 
> Disk /dev/sda: 262 MB, 262012928 bytes
> 
> 16 heads, 32 sectors/track, 999 cylinders
> ...

 

thx in advance!

PS - I Can even format it tho I'm not allowed to READ IT!!?! It's only in Gentoo, I have mount the same pen in Ubuntu and FC2 and FC3.

----------

## jpnag

ok I have found uot...in case it helps the default code page I choose for FAT wasn't among my choices of codepages/charsets.

----------

## andrewd18

I also am having problems with my USB Flash drive, now that I'm above 2.6.8.

```
StubbornAesthetics root # mount /dev/sdc1 /mnt/usb/

mount: wrong fs type, bad option, bad superblock on /dev/sdc1,

       or too many mounted file systems

```

I have usb-storage as a module, and it's in /etc/modules.autoload.d/kernel-2.6, and it does load at startup. All the appropriate drivers are built into the kernel (UHCI, EHCI, OHCI, VFAT support, etc). It was working fine before I went >= 2.6.8, and now it won't load. It won't even load my FAT32 ieee1394 hard drive, even though none of my config files have changed or anything.

How would I fix this? Custom udev rule? How would I create such a rule?

uname -a:

```
Linux StubbornAesthetics 2.6.11-gentoo-r6 #1 Sun Apr 10 14:01:20 CDT 2005 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux
```

~~ Andrew D.

----------

## richard.scott

 *Cubano wrote:*   

> Would some one be able to post their ls-l for /dev/sda* ?
> 
> Thanks.

 

Here's mine: 

```
# ls -l /dev/sda*

brw-rw----  1 root disk 8,  0 Aug  4 14:43 /dev/sda

brw-rw----  1 root disk 8,  1 Aug  4 14:56 /dev/sda1

brw-rw----  1 root disk 8, 10 Mar  4 16:53 /dev/sda10

brw-rw----  1 root disk 8, 11 Mar  4 16:53 /dev/sda11

brw-rw----  1 root disk 8, 12 Mar  4 16:53 /dev/sda12

brw-rw----  1 root disk 8, 13 Mar  4 16:53 /dev/sda13

brw-rw----  1 root disk 8, 14 Mar  4 16:53 /dev/sda14

brw-rw----  1 root disk 8, 15 Mar  4 16:53 /dev/sda15

brw-rw----  1 root disk 8,  2 Aug  4 14:56 /dev/sda2

brw-rw----  1 root disk 8,  3 Mar  4 16:53 /dev/sda3

brw-rw----  1 root disk 8,  4 Mar  4 16:53 /dev/sda4

brw-rw----  1 root disk 8,  7 Mar  4 16:53 /dev/sda7

brw-rw----  1 root disk 8,  8 Mar  4 16:53 /dev/sda8

brw-rw----  1 root disk 8,  9 Mar  4 16:53 /dev/sda9
```

----------

