# USB setup tutorial [SOLVED]

## statmobile

I am having all sorts of trouble trying to configure my lexar usb drive on my ECS K7SEM motherboard.  I keep searching and searching here, and I can't find any good walk-throughs on doing this in the 2.6 kernel.  I also can't seem to find anything about this in the Gentoo Wiki or User Docs.  Please HELP!  I'm going insane, and I know this has been discussed a zillion times, but I need the basics.

----------

## YopWongSapn

Let's start from the beginning.  What's the problem?  What are you doing to try and get it working, and what kind of errors (if any) do you receive?

----------

## statmobile

Well, first I want to do the basic routine, which would be connect to my Lexar JumpDrive.  Assuming this eventually works, I would like to hook my Palm m130 up as well.  First things first, I have compiled the following into my kernel (2.6.9-gentoo-r4):

Device Drivers>SCSI device support>

legacy /proc/scsi support

SCSI disk support

Device Drivers>USB support>

Support for Host-side USB

USB device filesystem

OHCI HCD support

USB Mass Storage support

USB Mass Storage verbose debug

All compiled into the kernel, not modular.  I also have FAT/NTFS support compiled into the kernel.  I don't see any of the sda*'s in /dev, and here is what I get with dmesg:

```

 $ dmesg | grep usb

usbcore: registered new driver usbfs

usbcore: registered new driver hub

usbcore: registered new driver usb-storage

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

usb 2-3: new full speed USB device using address 2

usb 2-3: device descriptor read/all, error -32

usb 2-3: new full speed USB device using address 3

usb 2-3: device descriptor read/all, error -32

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

usb 1-1: device not accepting address 2, error -110

usb 1-1: new full speed USB device using address 3

usb 1-1: device not accepting address 3, error -110

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

usb 1-3: device not accepting address 4, error -110

usb 1-3: new full speed USB device using address 5

usb 1-3: device not accepting address 5, error -110

usb 1-1: new full speed USB device using address 6

usb 1-1: device not accepting address 6, error -110

usb 1-1: new full speed USB device using address 7

usb 1-1: device not accepting address 7, error -110

usb 1-3: new full speed USB device using address 8

usb 1-3: device not accepting address 8, error -110

usb 1-3: new full speed USB device using address 9

usb 1-3: device not accepting address 9, error -110

usb 1-1: new full speed USB device using address 10

usb 1-1: device not accepting address 10, error -110

usb 1-1: new full speed USB device using address 11

usb 1-1: device not accepting address 11, error -110

usb 1-3: new full speed USB device using address 12

usb 1-3: device not accepting address 12, error -110

usb 1-3: new full speed USB device using address 13

usb 1-3: device not accepting address 13, error -110

usb 1-1: new full speed USB device using address 14

usb 1-1: device not accepting address 14, error -110

usb 1-1: new full speed USB device using address 15

usb 1-1: device not accepting address 15, error -110

usb 1-3: new full speed USB device using address 16

usb 1-3: device not accepting address 16, error -110

usb 1-3: new full speed USB device using address 17

usb 1-3: device not accepting address 17, error -110

usb 1-1: new full speed USB device using address 18

usb 1-1: device not accepting address 18, error -110

usb 1-1: new full speed USB device using address 19

usb 1-1: device not accepting address 19, error -110

usb 1-3: new full speed USB device using address 20

usb 1-3: device not accepting address 20, error -110

usb 1-3: new full speed USB device using address 21

usb 1-3: device not accepting address 21, error -110

usb 1-1: new full speed USB device using address 22

usb 1-1: device not accepting address 22, error -110

```

Thanks so much for helping me here!

----------

## nenn

dont forget to emerge hotplug that fixed alot of my usb woes

----------

## statmobile

hotplug or coldplug.  I was very confused by the newletter update.

----------

## statmobile

scratch that, I reread the tip in the newsletter, and now I'm using hotplug.  I get:

```

#tail -f /var/log/everything/current

an 13 19:14:28 [kernel] ohci_hcd 0000:00:01.3: wakeup

Jan 13 19:14:28 [kernel] usb 2-3: new full speed USB device using address 2

Jan 13 19:14:28 [kernel]   Vendor: Lexar     Model: JumpDrive Music   Rev: 0100

Jan 13 19:14:29 [kernel] SCSI device sda: 250624 512-byte hdwr sectors (128 MB)

Jan 13 19:14:29 [kernel]  /dev/scsi/host0/bus0/target0/lun0:<7>usb-storage: queuecommand called

Jan 13 19:14:29 [kernel]  p1

Jan 13 19:14:30 [scsi.agent] disk at /devices/pci0000:00/0000:00:01.3/usb2/2-3/2-3:1.0/host0/0:0:0:0J

```

And if 

```
cat /dev/sda1
```

 I get all kinds of jibberish, so it seems like they're communicating.  The problem is, when I try to mount:

```

# mount -v -t vfat /dev/sda1 /mnt/usbstick

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

       or too many mounted file systems

```

Similar output when I try to use msdos.  It's formatted under FAT16, what seems to be the problem?  

```

# fdisk -l

Disk /dev/sda: 128 MB, 128319488 bytes

255 heads, 63 sectors/track, 15 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1               1          15      120456    6  FAT16

```

----------

## soya

try mounting without the "1" of sda, sometimes i have had to mount a pendriver like that

```

mount /dev/sda /mnt/USB

```

----------

## statmobile

Just found out I had this problem discussed at MandrakeUsers.org.  Check out the post by the user richarddoe, who is apparently a gentoo user as well.  I am going to recompile the kernel, and I'll let you know how it turns out.

richarddoe said:

 *Quote:*   

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

 

----------

## statmobile

soya said

 *Quote:*   

> 
> 
> try mounting without the "1" of sda, sometimes i have had to mount a pendriver like that 
> 
> 

 

I tried that as well, and still got the same error, I'm in the middle of compiling my new kernel as I write this.

----------

## statmobile

I followed the instructions from that post I found, but I had to make one slight modification.  I had to also compile support for 

```

Codepage 437 (United States, Canada)

```

as well.  IT WORKS!  Thanks to everyone for the help.  One side note, I also added the following to /etc/fstab:

```

/dev/sda1               /mnt/usbstick   vfat            user,noauto,kudzu       0 0

```

Now I can mount it as a regular user, and write to it with no problem.

----------

