# recognizes usb flash drive, but can't mount properly(SOLVED)

## kwispy

Hey guys,

I've got a Lexar Media 512MB JumpDrive 2.0 Pro usb flash drive (key, whatever) and have come along way after getting udev working.  My main goal is to be able to transfer files from windows machines to my gentoo box.  Of course, the key workes fine with windows.  But the problem is, is that I can't seem to mount /dev/sda properly to write any files on the key.  I know there was some funny thing about formatting the key.  I formatted the drive with windows as a fat32 fs.  Should it be something else?  But what other fs can I use that windows recognizes?  But anyways, I got the scsi emulation stuff working so that when I plug in the drive, the 'devices' file under sda after mounting somewhere (mount -t usbfs /dev/sda /mnt/usb) shows my drive:

```
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6

B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.9-gentoo-r9 ehci_hcd

S:  Product=nVidia Corporation nForce2 USB Controller

S:  SerialNumber=0000:00:02.2

C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms
```

So it recognizes the drive, but the only other things in that same directory (/mnt/usb) are 001, 002, and 003. (which are directories that probably correspond to the three pairs of usb ports on my case).  001, 002, and 003 all have the file '001' inside them at all times, and when I plug in my usb drive, an additionaly file ,'002' shows up under the directory 001.  Now, I know that I put a file on the drive using windows named 'test.txt', but I can't seem to access it.  Am I mounting it wrong?  What is going on?  

I tried 'mount -t usbfs /dev/sda/001/002 /mnt/usb', but it still gives me the same things under /mnt/usb.Last edited by kwispy on Mon Jan 03, 2005 4:05 am; edited 1 time in total

----------

## pgf

Kwispy,

I just plugged in my Lexar JumpDrive and monuted it to verify. Here is what I see:

mount shows:

```
/dev/uba1 on /mnt/usbdrive type vfat 
```

dmesg:

```
usb 2-1: new full speed USB device using address 2

ub: sizeof ub_scsi_cmd 60 ub_dev 924

uba: device 2 capacity nsec 62464 bsize 512

uba: was not changed

 uba: uba1

usbcore: registered new driver ub
```

I am using 2.6.9-gentoo-r13 and I have udev support, and the device names ave changed from the old sda1 to uba1 as shown in the mount.

----------

## kwispy

ok, after looking at some more threads on this problem, I've been able to repartition my key with 'fdisk /dev/sda' which returned no errors.  Ok, thats good.  Now I have to make the vfat fs.

```
root@jonathan jon # mkfs.vfat /dev/sda

mkfs.vfat 2.10 (22 Sep 2003)

mkfs.vfat: Will not try to make filesystem on full-disk device '/dev/sda' (use -I if wanted)

```

That's interesting...

```
root@jonathan jon # mkfs.vfat -I /dev/sda

mkfs.vfat 2.10 (22 Sep 2003)

```

Alright, I have a vfat fs on the key.  Now I just need to mount it as vfat.

```
root@jonathan jon # mount -t vfat /dev/sda /home/jon/usb

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

       or too many mounted file systems
```

Grrrr...  I know I have vfat enabled in the kernel:

CONFIG_X86=y

CONFIG_MMU=y

CONFIG_UID16=y

CONFIG_GENERIC_ISA_DMA=y

CONFIG_GENERIC_IOMAP=y

CONFIG_EXPERIMENTAL=y

CONFIG_CLEAN_COMPILE=y

CONFIG_BROKEN_ON_SMP=y

CONFIG_LOCALVERSION=""

CONFIG_SWAP=y

CONFIG_SYSVIPC=y

CONFIG_SYSCTL=y

CONFIG_LOG_BUF_SHIFT=14

CONFIG_HOTPLUG=y

CONFIG_KALLSYMS=y

CONFIG_FUTEX=y

CONFIG_EPOLL=y

CONFIG_IOSCHED_NOOP=y

CONFIG_IOSCHED_AS=y

CONFIG_IOSCHED_DEADLINE=y

CONFIG_IOSCHED_CFQ=y

CONFIG_SHMEM=y

CONFIG_MODULES=y

CONFIG_MODULE_UNLOAD=y

CONFIG_OBSOLETE_MODPARM=y

CONFIG_MODVERSIONS=y

CONFIG_KMOD=y

CONFIG_X86_PC=y

CONFIG_MK7=y

CONFIG_X86_CMPXCHG=y

CONFIG_X86_XADD=y

CONFIG_X86_L1_CACHE_SHIFT=6

CONFIG_RWSEM_XCHGADD_ALGORITHM=y

CONFIG_X86_WP_WORKS_OK=y

CONFIG_X86_INVLPG=y

CONFIG_X86_BSWAP=y

CONFIG_X86_POPAD_OK=y

CONFIG_X86_GOOD_APIC=y

CONFIG_X86_INTEL_USERCOPY=y

CONFIG_X86_USE_PPRO_CHECKSUM=y

CONFIG_X86_USE_3DNOW=y

CONFIG_PREEMPT=y

CONFIG_X86_TSC=y

CONFIG_X86_MCE=y

CONFIG_NOHIGHMEM=y

CONFIG_MTRR=y

CONFIG_HAVE_DEC_LOCK=y

CONFIG_PM=y

CONFIG_ACPI_BLACKLIST_YEAR=0

CONFIG_PCI=y

CONFIG_PCI_GOANY=y

CONFIG_PCI_BIOS=y

CONFIG_PCI_DIRECT=y

CONFIG_PCI_NAMES=y

CONFIG_ISA=y

CONFIG_PCMCIA=y

CONFIG_PCMCIA_PROBE=y

CONFIG_BINFMT_ELF=y

CONFIG_BINFMT_AOUT=y

CONFIG_BINFMT_MISC=y

CONFIG_STANDALONE=y

CONFIG_PREVENT_FIRMWARE_BUILD=y

CONFIG_PNP=y

CONFIG_ISAPNP=y

CONFIG_BLK_DEV_FD=y

CONFIG_BLK_DEV_RAM=y

CONFIG_BLK_DEV_RAM_SIZE=4096

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_IDEDISK_MULTI_MODE=y

CONFIG_BLK_DEV_IDECD=y

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_BLK_DEV_RZ1000=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_IDEDMA_PCI_AUTO=y

CONFIG_BLK_DEV_AMD74XX=y

CONFIG_BLK_DEV_IDEDMA=y

CONFIG_IDEDMA_AUTO=y

CONFIG_SCSI=y

CONFIG_SCSI_PROC_FS=y

CONFIG_BLK_DEV_SD=y

CONFIG_CHR_DEV_SG=y

CONFIG_SCSI_MULTI_LUN=y

CONFIG_SCSI_CONSTANTS=y

CONFIG_SCSI_QLA2XXX=y

CONFIG_NET=y

CONFIG_PACKET=y

CONFIG_UNIX=y

CONFIG_INET=y

CONFIG_IP_MULTICAST=y

CONFIG_IPV6=y

CONFIG_NETDEVICES=y

CONFIG_DUMMY=m

CONFIG_NET_ETHERNET=y

CONFIG_MII=m

CONFIG_NET_PCI=y

CONFIG_FORCEDETH=y

CONFIG_8139TOO=m

CONFIG_NET_PCMCIA=y

CONFIG_PCMCIA_PCNET=y

CONFIG_INPUT=y

CONFIG_INPUT_MOUSEDEV=y

CONFIG_INPUT_MOUSEDEV_PSAUX=y

CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024

CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768

CONFIG_SOUND_GAMEPORT=y

CONFIG_SERIO=y

CONFIG_SERIO_I8042=y

CONFIG_SERIO_SERPORT=y

CONFIG_INPUT_KEYBOARD=y

CONFIG_KEYBOARD_ATKBD=y

CONFIG_INPUT_MOUSE=y

CONFIG_MOUSE_PS2=y

CONFIG_INPUT_MISC=y

CONFIG_INPUT_PCSPKR=y

CONFIG_VT=y

CONFIG_VT_CONSOLE=y

CONFIG_HW_CONSOLE=y

CONFIG_INOTIFY=y

CONFIG_UNIX98_PTYS=y

CONFIG_LEGACY_PTYS=y

CONFIG_LEGACY_PTY_COUNT=256

CONFIG_AGP=m

CONFIG_AGP_NVIDIA=m

CONFIG_I2C=m

CONFIG_I2C_CHARDEV=m

CONFIG_I2C_ALGOBIT=m

CONFIG_I2C_ISA=m

CONFIG_I2C_NFORCE2=m

CONFIG_I2C_SENSOR=m

CONFIG_SENSORS_W83781D=m

CONFIG_SENSORS_W83627HF=m

CONFIG_SENSORS_EEPROM=m

CONFIG_I2C_DEBUG_CORE=y

CONFIG_I2C_DEBUG_BUS=y

CONFIG_I2C_DEBUG_CHIP=y

CONFIG_FB=y

CONFIG_FB_MODE_HELPERS=y

CONFIG_FB_VESA=y

CONFIG_FB_VESA_TNG=y

CONFIG_FB_VESA_DEFAULT_MODE="1152x864@75"

CONFIG_VGA_CONSOLE=y

CONFIG_DUMMY_CONSOLE=y

CONFIG_LOGO=y

CONFIG_LOGO_LINUX_CLUT224=y

CONFIG_SPEAKUP_DEFAULT="none"

CONFIG_SOUND=y

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_RAWMIDI=m

CONFIG_SND_SEQUENCER=m

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_MPU401_UART=m

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_INTEL8X0=m

CONFIG_USB=y

CONFIG_USB_DEVICEFS=y

CONFIG_USB_EHCI_HCD=y

CONFIG_USB_EHCI_ROOT_HUB_TT=y

CONFIG_USB_OHCI_HCD=y

CONFIG_USB_STORAGE=y

CONFIG_USB_STORAGE_DEBUG=y

CONFIG_EXT2_FS=y

CONFIG_EXT3_FS=y

CONFIG_EXT3_FS_XATTR=y

CONFIG_JBD=y

CONFIG_FS_MBCACHE=y

CONFIG_REISERFS_FS=y

CONFIG_DNOTIFY=y

CONFIG_AUTOFS4_FS=y

CONFIG_ISO9660_FS=y

CONFIG_JOLIET=y

CONFIG_ZISOFS=y

CONFIG_ZISOFS_FS=y

CONFIG_UDF_FS=y

CONFIG_UDF_NLS=y

CONFIG_FAT_FS=y

CONFIG_MSDOS_FS=y

CONFIG_VFAT_FS=y

CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"

CONFIG_NTFS_FS=y

CONFIG_PROC_FS=y

CONFIG_PROC_KCORE=y

CONFIG_SYSFS=y

CONFIG_TMPFS=y

CONFIG_RAMFS=y

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

CONFIG_NFSD=y

CONFIG_NFSD_V3=y

CONFIG_NFSD_TCP=y

CONFIG_LOCKD=y

CONFIG_LOCKD_V4=y

CONFIG_EXPORTFS=y

CONFIG_SUNRPC=y

CONFIG_SMB_FS=y

CONFIG_MSDOS_PARTITION=y

CONFIG_NLS=y

CONFIG_NLS_DEFAULT="iso8859-1"

CONFIG_EARLY_PRINTK=y

CONFIG_CRC32=y

CONFIG_ZLIB_INFLATE=y

CONFIG_X86_BIOS_REBOOT=y

CONFIG_PC=y

Is there something else I forgot to enable in the kernel?

BTW, I am using gentoo-dev-sources 2.6.9-r9.

----------

## kwispy

aah, geez didn't know that

I'll try that now.

----------

## kwispy

```
root@jonathan jon # mount -t vfat /dev/uba1 /home/jon/usb

mount: special device /dev/uba1 does not exist

```

Heh, I don't even have any uba devices under /dev

Hmm, should I try turning off scsi support?

----------

## pgf

I think you will need at least scsi_generic so don't turn it off. What does dmesg say when you plug it in? Also, you need modules usbcore, uhci-hcd and ehci-hcd loaded before plugging in the device. I have ub loaded as well, but I don't know when that happened and I cannot reboot right now.

----------

## kwispy

```
root@jonathan jon # dmesg

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

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 0x7a 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 WRITE_10 (10 bytes)

usb-storage:  2a 00 00 00 00 00 00 00 f0 00

usb-storage: Bulk Command S 0x43425355 T 0x7b L 122880 F 0 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 122880 bytes, 6 entries

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

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 0x7b 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 TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: Bulk Command S 0x43425355 T 0x7c 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 0x7c 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_10 (10 bytes)

usb-storage:  28 00 00 00 00 00 00 00 01 00

usb-storage: Bulk Command S 0x43425355 T 0x7d L 512 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 512 bytes, 1 entries

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

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 0x7d 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_10 (10 bytes)

usb-storage:  28 00 00 00 00 01 00 00 01 00

usb-storage: Bulk Command S 0x43425355 T 0x7e L 512 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 512 bytes, 1 entries

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

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

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

usb-storage: *** thread sleeping.

Unable to load NLS charset cp437

FAT: codepage cp437 not found

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

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

usb-storage: *** thread sleeping.

usb 1-5: USB disconnect, address 4

usb-storage: storage_disconnect() called

usb-storage: usb_stor_stop_transport called

usb-storage: -- usb_stor_release_resources

usb-storage: -- sending exit command to thread

usb-storage: *** thread awakened.

usb-storage: -- exit command received

usb-storage: -- dissociate_dev

usb 1-5: new high speed USB device using address 5

usb-storage: USB Mass Storage device detected

usb-storage: -- associate_dev

usb-storage: Vendor: 0x05dc, Product: 0xa420, Revision: 0x3000

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

usb-storage: Vendor: LEXAR MEDIA,  Product: JUMPDRIVE PRO

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

scsi3 : SCSI emulation for USB Mass Storage devices

usb-storage: queuecommand called

usb-storage: *** thread sleeping.

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 0x80 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 0x80 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: LEXAR     Model: JUMPDRIVE PRO     Rev: 1000

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

usb-storage: -- transport indicates command failure

usb-storage: Issuing auto-REQUEST_SENSE

usb-storage: Bulk Command S 0x43425355 T 0x80000081 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 0x80000081 R 0 Stat 0x0

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

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

usb-storage: Unit Attention: Not ready to ready change, medium may have changed

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

usb-storage: *** thread sleeping.

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

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

usb-storage: *** thread sleeping.

SCSI device sda: 1014784 512-byte hdwr sectors (520 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 0x84 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 0x84 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 0x85 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 0x85 R 0 Stat 0x1

usb-storage: -- transport indicates command failure

usb-storage: Issuing auto-REQUEST_SENSE

usb-storage: Bulk Command S 0x43425355 T 0x80000085 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 0x80000085 R 0 Stat 0x0

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

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

usb-storage: Illegal Request: Invalid field in cdb

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

usb-storage: *** thread sleeping.

 sda:<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 0x86 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 0x86 R 0 Stat 0x0

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

usb-storage: *** thread sleeping.

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

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

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 5

```

I have usbcore, ohci-hcd, and ehci-hcd compiled into the kernel (ohci-hcd instead of uhci-hcd for nForce2).  

Do they have to be run as modules?

I'm recompiling them now as modules...

I couldn't find a modules called ub anywhere in the kernel. Hmmm...

----------

## kwispy

pgf, would you mind posting your .config as well as your module.autoload.d/kernel-2.6 file?

Here's my latest config:

```
CONFIG_X86=y

CONFIG_MMU=y

CONFIG_UID16=y

CONFIG_GENERIC_ISA_DMA=y

CONFIG_GENERIC_IOMAP=y

CONFIG_EXPERIMENTAL=y

CONFIG_CLEAN_COMPILE=y

CONFIG_BROKEN_ON_SMP=y

CONFIG_LOCALVERSION=""

CONFIG_SWAP=y

CONFIG_SYSVIPC=y

CONFIG_SYSCTL=y

CONFIG_LOG_BUF_SHIFT=14

CONFIG_HOTPLUG=y

CONFIG_KALLSYMS=y

CONFIG_FUTEX=y

CONFIG_EPOLL=y

CONFIG_IOSCHED_NOOP=y

CONFIG_IOSCHED_AS=y

CONFIG_IOSCHED_DEADLINE=y

CONFIG_IOSCHED_CFQ=y

CONFIG_SHMEM=y

CONFIG_MODULES=y

CONFIG_MODULE_UNLOAD=y

CONFIG_OBSOLETE_MODPARM=y

CONFIG_MODVERSIONS=y

CONFIG_KMOD=y

CONFIG_X86_PC=y

CONFIG_MK7=y

CONFIG_X86_CMPXCHG=y

CONFIG_X86_XADD=y

CONFIG_X86_L1_CACHE_SHIFT=6

CONFIG_RWSEM_XCHGADD_ALGORITHM=y

CONFIG_X86_WP_WORKS_OK=y

CONFIG_X86_INVLPG=y

CONFIG_X86_BSWAP=y

CONFIG_X86_POPAD_OK=y

CONFIG_X86_GOOD_APIC=y

CONFIG_X86_INTEL_USERCOPY=y

CONFIG_X86_USE_PPRO_CHECKSUM=y

CONFIG_X86_USE_3DNOW=y

CONFIG_PREEMPT=y

CONFIG_X86_TSC=y

CONFIG_X86_MCE=y

CONFIG_NOHIGHMEM=y

CONFIG_MTRR=y

CONFIG_HAVE_DEC_LOCK=y

CONFIG_PM=y

CONFIG_ACPI_BLACKLIST_YEAR=0

CONFIG_PCI=y

CONFIG_PCI_GOANY=y

CONFIG_PCI_BIOS=y

CONFIG_PCI_DIRECT=y

CONFIG_PCI_NAMES=y

CONFIG_ISA=y

CONFIG_PCMCIA=y

CONFIG_PCMCIA_PROBE=y

CONFIG_BINFMT_ELF=y

CONFIG_BINFMT_AOUT=y

CONFIG_BINFMT_MISC=y

CONFIG_STANDALONE=y

CONFIG_PREVENT_FIRMWARE_BUILD=y

CONFIG_PNP=y

CONFIG_ISAPNP=y

CONFIG_BLK_DEV_FD=y

CONFIG_BLK_DEV_RAM=y

CONFIG_BLK_DEV_RAM_SIZE=4096

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_IDEDISK_MULTI_MODE=y

CONFIG_BLK_DEV_IDECD=y

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

CONFIG_BLK_DEV_RZ1000=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

CONFIG_IDEDMA_PCI_AUTO=y

CONFIG_BLK_DEV_AMD74XX=y

CONFIG_BLK_DEV_IDEDMA=y

CONFIG_IDEDMA_AUTO=y

CONFIG_SCSI=y

CONFIG_SCSI_PROC_FS=y

CONFIG_BLK_DEV_SD=m

CONFIG_CHR_DEV_SG=y

CONFIG_SCSI_CONSTANTS=y

CONFIG_SCSI_QLA2XXX=y

CONFIG_NET=y

CONFIG_PACKET=y

CONFIG_UNIX=y

CONFIG_INET=y

CONFIG_IP_MULTICAST=y

CONFIG_IPV6=y

CONFIG_NETDEVICES=y

CONFIG_DUMMY=m

CONFIG_NET_ETHERNET=y

CONFIG_MII=m

CONFIG_NET_PCI=y

CONFIG_FORCEDETH=y

CONFIG_8139TOO=m

CONFIG_NET_PCMCIA=y

CONFIG_PCMCIA_PCNET=y

CONFIG_INPUT=y

CONFIG_INPUT_MOUSEDEV=y

CONFIG_INPUT_MOUSEDEV_PSAUX=y

CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024

CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768

CONFIG_SOUND_GAMEPORT=y

CONFIG_SERIO=y

CONFIG_SERIO_I8042=y

CONFIG_SERIO_SERPORT=y

CONFIG_INPUT_KEYBOARD=y

CONFIG_KEYBOARD_ATKBD=y

CONFIG_INPUT_MOUSE=y

CONFIG_MOUSE_PS2=y

CONFIG_INPUT_MISC=y

CONFIG_INPUT_PCSPKR=y

CONFIG_VT=y

CONFIG_VT_CONSOLE=y

CONFIG_HW_CONSOLE=y

CONFIG_INOTIFY=y

CONFIG_UNIX98_PTYS=y

CONFIG_LEGACY_PTYS=y

CONFIG_LEGACY_PTY_COUNT=256

CONFIG_AGP=m

CONFIG_AGP_NVIDIA=m

CONFIG_I2C=m

CONFIG_I2C_CHARDEV=m

CONFIG_I2C_ALGOBIT=m

CONFIG_I2C_ISA=m

CONFIG_I2C_NFORCE2=m

CONFIG_I2C_SENSOR=m

CONFIG_SENSORS_W83781D=m

CONFIG_SENSORS_W83627HF=m

CONFIG_SENSORS_EEPROM=m

CONFIG_I2C_DEBUG_CORE=y

CONFIG_I2C_DEBUG_BUS=y

CONFIG_I2C_DEBUG_CHIP=y

CONFIG_FB=y

CONFIG_FB_MODE_HELPERS=y

CONFIG_FB_VESA=y

CONFIG_FB_VESA_TNG=y

CONFIG_FB_VESA_DEFAULT_MODE="1152x864@75"

CONFIG_VGA_CONSOLE=y

CONFIG_DUMMY_CONSOLE=y

CONFIG_LOGO=y

CONFIG_LOGO_LINUX_CLUT224=y

CONFIG_SPEAKUP_DEFAULT="none"

CONFIG_SOUND=y

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_RAWMIDI=m

CONFIG_SND_SEQUENCER=m

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_SEQUENCER_OSS=y

CONFIG_SND_MPU401_UART=m

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_INTEL8X0=m

CONFIG_USB=m

CONFIG_USB_DEVICEFS=y

CONFIG_USB_EHCI_HCD=m

CONFIG_USB_OHCI_HCD=m

CONFIG_USB_STORAGE=m

CONFIG_USB_STORAGE_DEBUG=y

CONFIG_EXT2_FS=y

CONFIG_EXT3_FS=y

CONFIG_EXT3_FS_XATTR=y

CONFIG_JBD=y

CONFIG_FS_MBCACHE=y

CONFIG_REISERFS_FS=y

CONFIG_DNOTIFY=y

CONFIG_AUTOFS4_FS=y

CONFIG_ISO9660_FS=y

CONFIG_JOLIET=y

CONFIG_ZISOFS=y

CONFIG_ZISOFS_FS=y

CONFIG_UDF_FS=y

CONFIG_UDF_NLS=y

CONFIG_FAT_FS=y

CONFIG_MSDOS_FS=y

CONFIG_VFAT_FS=y

CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"

CONFIG_NTFS_FS=y

CONFIG_PROC_FS=y

CONFIG_PROC_KCORE=y

CONFIG_SYSFS=y

CONFIG_TMPFS=y

CONFIG_RAMFS=y

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

CONFIG_NFSD=y

CONFIG_NFSD_V3=y

CONFIG_NFSD_TCP=y

CONFIG_LOCKD=y

CONFIG_LOCKD_V4=y

CONFIG_EXPORTFS=y

CONFIG_SUNRPC=y

CONFIG_SMB_FS=y

CONFIG_MSDOS_PARTITION=y

CONFIG_NLS=y

CONFIG_NLS_DEFAULT="iso8859-1"

CONFIG_EARLY_PRINTK=y

CONFIG_CRC32=y

CONFIG_ZLIB_INFLATE=y

CONFIG_X86_BIOS_REBOOT=y

CONFIG_PC=y

```

----------

## pgf

Sorry for the delay. My config is at peter.not4hire.net/~pfarr/config.gz. Here is my /etc/modules.autoload.d/kernel

```

pfarr@peter pfarr $ cat /etc/modules.autoload.d/kernel-2.6

# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $

# For example:

# 3c59x

#ipw2100

e100

#usbcore

#uhci-hcd

#ehci-hcd

```

In spite of what it says, the usb modules are being loaded early. I am still trying to understand this gentoo startup. I have made my way through the mainstream UN*X systems since the '70s and this is one of the most complex I have seen yet. I only just converted from RedHat duing the Christmas holidays.

Don't give up; I have only made my usb stuff work reliably over the past few days. Unfortunately, in spite of fairly detailed notes I cannot tell for sure exactly what changes made it work.

----------

## pgf

I just had a quick look through your dmesg output and I see:

```
Unable to load NLS charset cp437

FAT: codepage cp437 not found

```

This may be the problem, but it is hard to say. At least the drive is being recognized and attached. The ehci, etc. should not _have_ to be modules but I suspect I have had problems in the past with modules compiled into the kernel.

I did a quick google search and found this:

 *Quote:*   

> 
> 
> phunni,
> 
> I was having the same problem on an AMD64 box running Gentoo with 2.6.9 kernel.
> ...

 

from  http://mandrakeusers.org/lofiversion/index.php/t20756.html

What is interesting is that your .config has

```
CONFIG_FAT_DEFAULT_CODEPAGE=437

```

----------

## pgf

Kwispy, did you see this thread: https://forums.gentoo.org/viewtopic.php?t=272682&highlight=?

----------

## kwispy

AHA!  Sweet, it works, though I'm not sure what I did exactly.  

At first, I set these in my config:

```
CONFIG_NLS_CODEPAGE_437=y

CONFIG_NLS_ISO8859_1=y
```

But that wasn't enough for some reason, so I started to go through my config and check it against yours. Here are the things I added on:

```
CONFIG_USB_DYNAMIC_MINORS=y

CONFIG_USB_SUSPEND=y

CONFIG_USB_STORAGE_RW_DETECT=y

CONFIG_USB_STORAGE_DATAFAB=y

CONFIG_USB_STORAGE_DPCM=y

CONFIG_NLS_ASCII=y

CONFIG_NLS_UTF8=y
```

I'm not really sure what lines actually made it work, but what I do know is that it works!

Thanks alot for your help pgf!  :Very Happy: 

Now I just need some sort of automounter, but that'll be for another day.  I need some sleep...

----------

