# Weird USB Stick [solved]

## mathgeek

Hi!

I'm running kernel-2.6.8-gentoo-r3 with support for SCSI and all the USB stuff I need - I guess at least. When I plug in my USB stick it is registered as sda1 but still I cannot mount it:

```
mount -t vfat /dev/sda1 /mnt/usbstick

mount: /dev/sda1: can't read superblock
```

I tried to re-partition the thing since the partition table looked really strange. Now it looks OK with a FAT12 on it.

lsusb lists the following:

```
Bus 004 Device 002: ID 0ea0:6828 Ours Technology, Inc. OTI-6828 Flash Disk
```

dmesg comes up with

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

scsi0 : SCSI emulation for USB Mass Storage devices

  Vendor: OTi       Model: USB Flash Disk    Rev: 1.89

  Type:   Direct-Access                      ANSI SCSI revision: 02

SCSI device sda: 32000 512-byte hdwr sectors (16 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0: p1

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

USB Mass Storage device found at 2

SCSI error : <0 0 0 0> return code = 0x10070000

end_request: I/O error, dev sda, sector 32

FAT: unable to read boot sector

```

Any help on this issue is greatly appreciated!Last edited by mathgeek on Thu Nov 18, 2004 9:38 am; edited 1 time in total

----------

## furanku

Some USB Sticks have a strange USB implementation, this was discussed on the usb-devel mailing list a month ago, there are also some hints and patches. Take a look at this thread!

Frank

----------

## mathgeek

I tried something else, I switched to udev as suggested in 

https://forums.gentoo.org/viewtopic.php?t=243101 but that brings up another problem. The entry /dev/usbstick is not created. My rule for this looks like

```
BUS="usb", SYSFS{serial}="E08A593FA762345D", NAME="usbstick"
```

The content of /proc/bus/usb/devices is

```

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3

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

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

P:  Vendor=0000 ProdID=0000 Rev= 2.06

C:* #Ifs= 1 Cfg#= 1 Atr=c0 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=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3

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

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

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.9-rc4-mm1 ohci_hcd

S:  Product=Silicon Integrated Systems [SiS] USB 1.0 Controller

S:  SerialNumber=0000:00:03.0

C:* #Ifs= 1 Cfg#= 1 Atr=c0 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=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  8 Spd=12  MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=0ea0 ProdID=6828 Rev= 1.10

S:  Manufacturer=USB

S:  Product=Flash Disk

S:  SerialNumber=E08A593FA762345D

C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA

I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=ub

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

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-rc4-mm1 ehci_hcd

S:  Product=Silicon Integrated Systems [SiS] USB 2.0 Controller

S:  SerialNumber=0000:00:03.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

```

Any ideas why this doesn't work? Do I have to rc-update something or do I have to start something somewhere else?

Thanx!

----------

## furanku

I don't think it's a devfs/udev related Problem, since your dmesg output shows that the USB stick is recognized by the usb mass storage driver, but the access to it ends up with I/O errors.

udev (which I use at home, but have similar problems as described in the link I above, and as you described in your first posting) can't fix any problems in the underlaying kernel drivers for read/write access to the media (e.g. usb-storage).

So I would try to solve one problem at the time. If your USB stick works with devfs you'll surely get it also working with udev.

----------

## mathgeek

I looked at the thread and found that my device is already included in the unusual_devs.h file.

```
/* Reported by Rastislav Stanik <rs_kernel@yahoo.com> */

UNUSUAL_DEV(  0x0ea0, 0x6828, 0x0110, 0x0110,

                "USB",

                "Flash Disk",

                US_SC_DEVICE, US_PR_DEVICE, NULL,

                US_FL_IGNORE_RESIDUE ),

```

----------

## luismg

 *Quote:*   

> mount -t vfat /dev/sda1 /mnt/usbstick 
> 
> mount: /dev/sda1: can't read superblock

 

shouldn't it be just sda instead of sda1?

----------

## mathgeek

No, that's fine. This works perfectly on other systems running Linux.

----------

## furanku

Are you sure? In my  development-sources-2.6.9_rc3 I cannot find the entry for your USB stick in unusual_devs.h

```
$ grep 0x0ea0 /usr/src/linux-2.6.9-rc3/drivers/usb/storage/unusual_devs.h

$

```

If you found a posting on the usb-devel list containing that patch, it doesn't mean that that patch is already included in the kernel sources, esp. since the discussion on the ML was just one month ago. And the symptoms (SCSI error : <0 0 0 0> return code = 0x10070000, end_request: I/O error, dev sda) described there look exactly like what you've posted.

Before the usb-storage broke compabilty with 2.6.8 with my usbstick, the entry

```
BUS="usb", SYSFS{product}="MusicDrive  ", KERNEL="sd?1", NAME="%k", SYMLINK="usbstick"

```

in /etc/udev/rules.d/10-udev.rules worked for me.Last edited by furanku on Thu Oct 28, 2004 4:22 pm; edited 3 times in total

----------

## bennettp

luismg:

Most sticks include a dos partition table; these would be mounted using /dev/sda1. Some, like mine (and probably yours, luismg) do not have a partition table. These are mounted using /dev/sda.

----------

## furanku

BTW.: Did you also try setting max_sector to something small, as mentioned in that thread, e.g doing as root

```
# echo 64 >/sys/block/sda/device/max_sectors
```

That helped for my device! Thanks for putting my attention back to the not working USB stick, I always wanted to investigate further whats wrong with my stick, but I never took the time.

So, now that we solved my problem...  :Cool:  does a lower max_sector value has eny effect on your USB stick?

----------

## mathgeek

I finally solved the problem.  :Very Happy:  I tried the latest mm-sources and it worked with no additional tricks. Now the nvidia driver gives me some pain since it does not like the mm-sources but that is something I do not need in the first place. 

So thank you for all your ideas and hints!

mathgeek

----------

