Author Topic: Usb Storage  (Read 7957 times)

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Usb Storage
« on: October 19, 2007, 06:36:50 am »
help
i'm trying to mount my usb key on debian tichy

so i've put these lines from angstrom fstab into /etc/fstab:

Quote
#
# USB
#
/dev/sda1       /media/usbhdd   vfat            noauto,umask=000,noatime,iocharset=utf8,codepage=932    0  0
devpts          /dev/pts        devpts          mode=0620,gid=5       0  0
usbfs           /proc/bus/usb   usbfs           defaults              0  0


then i've created /dev/sda nodes:
mknod /dev/sda b 8 0
mknod /dev/sda1 b 8 1
mknod /dev/sda2 b 8 2


then
modprobe usbstorage
then i plug my usb key

then mount /media/hdd

it fails with :

mount: /dev/sda1 is not a valid block device


any help please?
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Usb Storage
« Reply #1 on: October 19, 2007, 07:49:15 am »
How about:

modprobde ohci-hcd?

If that works, then simply add ohci-hcd to /etc/modules so that the module will load automatically when the system boots up.

Or ask the gurus?  

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Usb Storage
« Reply #2 on: October 19, 2007, 08:58:14 am »
Quote from: ZDevil
How about:

modprobde ohci-hcd?

If that works, then simply add ohci-hcd to /etc/modules so that the module will load automatically when the system boots up.

Or ask the gurus?  


oh yeah i forgot the ohci-hcd stuff ..
unhopefully, i now have a curious message as i plug the key :

rejected 1 configuration due to insufficient available bus power
...........
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Usb Storage
« Reply #3 on: October 19, 2007, 09:31:14 am »
I got the same error when plugging in my Sony Ericsson w800i (which can function as a USB mass storage device).

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Usb Storage
« Reply #4 on: October 19, 2007, 09:49:40 am »
Quote from: ZDevil
I got the same error when plugging in my Sony Ericsson w800i (which can function as a USB mass storage device).

hmm
i've just try to plug in my PSP (which has its own power!) and .. it works!
so is it a kernel problem or some config files to tweak ?
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

e.stoiber

  • Newbie
  • *
  • Posts: 9
    • View Profile
Usb Storage
« Reply #5 on: October 19, 2007, 10:19:01 am »
I have the same prob with insufficient power,
but I tested the stick with the stock sharp rom and there it got mounted without problems.
So it must be some kernel probs,.....or ?????

tux

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
    • http://
Usb Storage
« Reply #6 on: October 19, 2007, 12:42:59 pm »
Quote from: e.stoiber
I have the same prob with insufficient power,
but I tested the stick with the stock sharp rom and there it got mounted without problems.
So it must be some kernel probs,.....or ?????
 I've not tried my usb storage devices yet. I will try to find time to do so.  One suggestion: try the mount commands from a terminal and see what the messages are. I have had retorts from the system when mounting cards demanding that I specify the filetype. Yes, jp, I did notice the settings in your file! But I think it is probably easier to debug using mount from the command line. Don't know if this is anything to do with it. It shouldn't be kernel problems: if angstrom kernels were having difficulties in that respect the bug reports would be flying in.

I wonder how significant the message about power is?

I'll try one of my sticks that did work before Titchy and report any success or useful error messages back.  

PS Neil has put a source page on the TitchyLinux site. The kernel source is 2.6.20, which I believe is the base for the zImage on the site.
3200 aka BigZ, swapped in 16GB Sandisk Extreme III CF, Cacko 1.23 full,  new SDHC >2GB module,
SL860 Cacko 1.23 full, new SDHC >2GB module,
6000L SharpRom 1.12 + Tetsu kernel,
5500 TKC home on SD x 2 (with SD>1GB),
Archos PMA30 with OPEN PMA (Giraffe),
Nokia 770 (Hackers Edition)
Nokia 800 (ITOS 2008), 4GB SDHC x 2
Asus eeepc 4G (black), with 1GB ram, dual boot Xandros on SSD with Ubuntu Lucid Lynx on 16 GB SDHC,
Tmobile G1 Android (black), with Cyanogen's  Firerat's MTD script and Amon Ra Recovery 1.7.0
Tmobile HTC Wildfire.. rooted and on Cyanogen's 7.3 nightly Rom
Kopi/Kapi on everything bar the phone and the Nokias, there is a beta for the nokias...

All the above are retired

Samsung Note 8 N5110
Samsung Note N7105
FBreader on the lot!

tux

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
    • http://
Usb Storage
« Reply #7 on: October 19, 2007, 02:45:01 pm »
 
Here is the list of modules that are loaded at the present:

debian:~# lsmod
Module                  Size  Used by
sd_mod                 15280  0
usb_storage            34788  0
scsi_mod               91848  2 sd_mod,usb_storage
ohci_hcd               20708  0
usbcore               117472  3 usb_storage,ohci_hcd
ipv6                  253404  12
snd_pcm_oss            49088  0
snd_mixer_oss          15328  2 snd_pcm_oss
snd_soc_spitz           5612  0
snd_soc_pxa2xx_i2s      3352  1 snd_soc_spitz
snd_soc_wm8750         18736  2 snd_soc_spitz
snd_soc_pxa2xx          4416  1 snd_soc_spitz
snd_soc_core           26176  3 snd_soc_spitz,snd_soc_wm8750,snd_soc_pxa2xx
snd_pcm                81381  3 snd_pcm_oss,snd_soc_pxa2xx,snd_soc_core
snd_timer              21828  1 snd_pcm
snd                    52084  7 snd_pcm_oss,snd_mixer_oss,snd_soc_spitz,snd_soc_wm8750,snd_soc_core,snd_pcm,snd_
imer
soundcore               6596  2 snd
snd_page_alloc          6312  1 snd_pcm
dm_snapshot            14816  0
dm_mirror              18868  0
dm_mod                 52396  2 dm_snapshot,dm_mirror
hostap_cs              55092  0
hostap                108932  1 hostap_cs
ieee80211_crypt         4928  1 hostap
orinoco_cs             13860  1
orinoco                40564  1 orinoco_cs
hermes                  5856  2 orinoco_cs,orinoco
mousedev                9788  1
debian:~#
I'll put the other bits in further posts.
 
3200 aka BigZ, swapped in 16GB Sandisk Extreme III CF, Cacko 1.23 full,  new SDHC >2GB module,
SL860 Cacko 1.23 full, new SDHC >2GB module,
6000L SharpRom 1.12 + Tetsu kernel,
5500 TKC home on SD x 2 (with SD>1GB),
Archos PMA30 with OPEN PMA (Giraffe),
Nokia 770 (Hackers Edition)
Nokia 800 (ITOS 2008), 4GB SDHC x 2
Asus eeepc 4G (black), with 1GB ram, dual boot Xandros on SSD with Ubuntu Lucid Lynx on 16 GB SDHC,
Tmobile G1 Android (black), with Cyanogen's  Firerat's MTD script and Amon Ra Recovery 1.7.0
Tmobile HTC Wildfire.. rooted and on Cyanogen's 7.3 nightly Rom
Kopi/Kapi on everything bar the phone and the Nokias, there is a beta for the nokias...

All the above are retired

Samsung Note 8 N5110
Samsung Note N7105
FBreader on the lot!

tux

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
    • http://
Usb Storage
« Reply #8 on: October 19, 2007, 02:57:11 pm »
 What happens with the 128MB stick: when I connected the stick.

usb 1-2: new full speed USB device using pxa27x-ohci and address 5
usb 1-2: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi 1:0:0:0: Direct-Access              disgo            4.31 PQ: 0 ANSI: 0 CCS
SCSI device sda: 239872 512-byte hdwr sectors (123 MB)
sda: Write Protect is off
sda: Mode Sense: 45 00 00 08
sda: assuming drive cache: write through

SCSI device sda: 239872 512-byte hdwr sectors (123 MB)
sda: Write Protect is off
sda: Mode Sense: 45 00 00 08
sda: assuming drive cache: write through
sda: unknown partition table
sd 1:0:0:0: Attached scsi removable disk sda
usb-storage: device scan complete

Then I used mount:

debian:/# mount /dev/sda1 /media/cf -t vfat

mount: special device /dev/sda1 does not exist


So I have used fdisk and will now format the stick as ext2 and see what happens
« Last Edit: October 19, 2007, 03:00:33 pm by tux »
3200 aka BigZ, swapped in 16GB Sandisk Extreme III CF, Cacko 1.23 full,  new SDHC >2GB module,
SL860 Cacko 1.23 full, new SDHC >2GB module,
6000L SharpRom 1.12 + Tetsu kernel,
5500 TKC home on SD x 2 (with SD>1GB),
Archos PMA30 with OPEN PMA (Giraffe),
Nokia 770 (Hackers Edition)
Nokia 800 (ITOS 2008), 4GB SDHC x 2
Asus eeepc 4G (black), with 1GB ram, dual boot Xandros on SSD with Ubuntu Lucid Lynx on 16 GB SDHC,
Tmobile G1 Android (black), with Cyanogen's  Firerat's MTD script and Amon Ra Recovery 1.7.0
Tmobile HTC Wildfire.. rooted and on Cyanogen's 7.3 nightly Rom
Kopi/Kapi on everything bar the phone and the Nokias, there is a beta for the nokias...

All the above are retired

Samsung Note 8 N5110
Samsung Note N7105
FBreader on the lot!

tux

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
    • http://
Usb Storage
« Reply #9 on: October 19, 2007, 03:12:42 pm »
 So I'm cheating and using gparted on 'Big Z'. I'm logged in as the 'normal' user while I'm SSHing in as root from my desktop.

I'm removing the stick and replacing it to see what dmesg says.

usb 1-2: new full speed USB device using pxa27x-ohci and address 7
usb 1-2: configuration #1 chosen from 1 choice
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
scsi 3:0:0:0: Direct-Access              disgo            4.31 PQ: 0 ANSI: 0 CCS
SCSI device sda: 239872 512-byte hdwr sectors (123 MB)
sda: Write Protect is off
sda: Mode Sense: 45 00 00 08
sda: assuming drive cache: write through
SCSI device sda: 239872 512-byte hdwr sectors (123 MB)
sda: Write Protect is off
sda: Mode Sense: 45 00 00 08
sda: assuming drive cache: write through
 sda: sda1

sd 3:0:0:0: Attached scsi removable disk sda
usb-storage: device scan complete


Now we'll see what mount produces:

debian:/# mount /dev/sda1 /media/cf
debian:/# ls /media/cf
lost+found
debian:/#


So success with a 128MB stick partitioned and formatted as ext2.

I'll experiment further with partitioning and formatting this and the larger devices.

I'm assuming from the other posts that sel-powered devices like my iriver and the Archos should be ok using mount? I'll leave it to you guys to play with fstab and such.

I'llget back if partitioning the bigger sticks gets over the bus power message. I suspect that some clever chap will need to tell us what to do to sort that out though.

Meanie, Koen where are you when we need you?  

Cheers

 
« Last Edit: October 19, 2007, 03:13:17 pm by tux »
3200 aka BigZ, swapped in 16GB Sandisk Extreme III CF, Cacko 1.23 full,  new SDHC >2GB module,
SL860 Cacko 1.23 full, new SDHC >2GB module,
6000L SharpRom 1.12 + Tetsu kernel,
5500 TKC home on SD x 2 (with SD>1GB),
Archos PMA30 with OPEN PMA (Giraffe),
Nokia 770 (Hackers Edition)
Nokia 800 (ITOS 2008), 4GB SDHC x 2
Asus eeepc 4G (black), with 1GB ram, dual boot Xandros on SSD with Ubuntu Lucid Lynx on 16 GB SDHC,
Tmobile G1 Android (black), with Cyanogen's  Firerat's MTD script and Amon Ra Recovery 1.7.0
Tmobile HTC Wildfire.. rooted and on Cyanogen's 7.3 nightly Rom
Kopi/Kapi on everything bar the phone and the Nokias, there is a beta for the nokias...

All the above are retired

Samsung Note 8 N5110
Samsung Note N7105
FBreader on the lot!

tux

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
    • http://
Usb Storage
« Reply #10 on: October 19, 2007, 03:41:08 pm »
 I've just connected my Archos PMA 430 to to Big Z! I might add I'm using the Archos host cable to the Z and the Archos data cable to join up to the Archos. Here is dmesg:

usb 1-2: new full speed USB device using pxa27x-ohci and address 8
usb 1-2: configuration #1 chosen from 1 choice
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 8
usb-storage: waiting for device to settle before scanning
scsi 4:0:0:0: Direct-Access     HTC42603 0G7AT00               PQ: 0 ANSI: 0
SCSI device sda: 58605120 512-byte hdwr sectors (30006 MB)
sda: Write Protect is off
sda: Mode Sense: 33 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 58605120 512-byte hdwr sectors (30006 MB)
sda: Write Protect is off
sda: Mode Sense: 33 00 00 00
sda: assuming drive cache: write through
 sda: sda1 sda2
sd 4:0:0:0: Attached scsi disk sda
usb-storage: device scan complete
debian:/#

Yes it does show two partitions on the Archos. The openpma, uses bitbake? and OE stuff?, OS sets up two partitions to do its thing.

Now for the mount instruction:

debian:/# mount /dev/sda1 /media/sticks
debian:/# ls /media/sticks
books  Documents  Mophun  Music  pda  Photo  System  Video
debian:/#

sda1 on the Archos is the working partition.

debian:/# df /media/sticks
Filesystem           1K-blocks      Used  Available   Use% Mounted on
/dev/sda1          28702096   1100944  27601152   4%   /media/sticks
debian:/#

Approx 30GB available.

I think my iriver with the 40GB would mount also.

Shame I have no real use for this space as yet!

I will play about with other usb storage devices and in particular the bigger sticks. I'll report back. I hope someone has an idea about the bus power message. I'm, sure I scanned a post about that issue somewhere, ages ago. Can't remember where though.  

It's not all hopeless though, is it?
3200 aka BigZ, swapped in 16GB Sandisk Extreme III CF, Cacko 1.23 full,  new SDHC >2GB module,
SL860 Cacko 1.23 full, new SDHC >2GB module,
6000L SharpRom 1.12 + Tetsu kernel,
5500 TKC home on SD x 2 (with SD>1GB),
Archos PMA30 with OPEN PMA (Giraffe),
Nokia 770 (Hackers Edition)
Nokia 800 (ITOS 2008), 4GB SDHC x 2
Asus eeepc 4G (black), with 1GB ram, dual boot Xandros on SSD with Ubuntu Lucid Lynx on 16 GB SDHC,
Tmobile G1 Android (black), with Cyanogen's  Firerat's MTD script and Amon Ra Recovery 1.7.0
Tmobile HTC Wildfire.. rooted and on Cyanogen's 7.3 nightly Rom
Kopi/Kapi on everything bar the phone and the Nokias, there is a beta for the nokias...

All the above are retired

Samsung Note 8 N5110
Samsung Note N7105
FBreader on the lot!

e.stoiber

  • Newbie
  • *
  • Posts: 9
    • View Profile
Usb Storage
« Reply #11 on: October 19, 2007, 03:58:59 pm »
So,... I did check some kernelsources on my gentoo box and it turns out,.......
there are changes since kernel 2.6.17 to check the powerconsumption !!

tux

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
    • http://
Usb Storage
« Reply #12 on: October 19, 2007, 04:44:12 pm »
Quote from: e.stoiber
So,... I did check some kernelsources on my gentoo box and it turns out,.......
there are changes since kernel 2.6.17 to check the powerconsumption !!
 looks like you have found some pointers to the problem. I expect there is a switch to turn off the checking somewhere!  

But I do know that  some people have used a powered hub to get round these problems. Not very convenient for usb sticks though.  

The two larger usb sticks I used, an Attache 1GB and a Disgo 512MB got the power message. The Disgo actually has a bright blue led that flashes on access.  

I was surprised to find that a cheap CF reader worked without complaint!   I did find that I needed to run fdisk /dev/sda and then quit from fdisk, before a 2GB CF card would work. I can't remember if I had to do that for the smaller one I tried.  

I tried a lexar JumpDrive, meant to be an SD card reader, which got the power message. I also tried a sdhc reader that came with the cards I use in the N800, that got the same message.

I have some other little gadgets that I will check out and report back on.

Somebody said that usb wifi dongles had problems running on Z power. I wonder if that problem is related.

I suppose that I should say I've been doing all this while the adapter is plugged in. Better check the success stories without external power!  

Cheers for now

 
« Last Edit: October 19, 2007, 04:51:41 pm by tux »
3200 aka BigZ, swapped in 16GB Sandisk Extreme III CF, Cacko 1.23 full,  new SDHC >2GB module,
SL860 Cacko 1.23 full, new SDHC >2GB module,
6000L SharpRom 1.12 + Tetsu kernel,
5500 TKC home on SD x 2 (with SD>1GB),
Archos PMA30 with OPEN PMA (Giraffe),
Nokia 770 (Hackers Edition)
Nokia 800 (ITOS 2008), 4GB SDHC x 2
Asus eeepc 4G (black), with 1GB ram, dual boot Xandros on SSD with Ubuntu Lucid Lynx on 16 GB SDHC,
Tmobile G1 Android (black), with Cyanogen's  Firerat's MTD script and Amon Ra Recovery 1.7.0
Tmobile HTC Wildfire.. rooted and on Cyanogen's 7.3 nightly Rom
Kopi/Kapi on everything bar the phone and the Nokias, there is a beta for the nokias...

All the above are retired

Samsung Note 8 N5110
Samsung Note N7105
FBreader on the lot!

e.stoiber

  • Newbie
  • *
  • Posts: 9
    • View Profile
Usb Storage
« Reply #13 on: October 19, 2007, 04:52:42 pm »
I checked further in hub.c source and at least the checking seems to be gone since 2.6.21,
so i'll try a 2.6.22 from angstrom tomorrow and see what it tells me.
Another possibility is to try the not working device if the "Z" is not on battery power.

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Usb Storage
« Reply #14 on: October 19, 2007, 05:36:55 pm »
Quote from: e.stoiber
I checked further in hub.c source and at least the checking seems to be gone since 2.6.21,
so i'll try a 2.6.22 from angstrom tomorrow and see what it tells me.
Another possibility is to try the not working device if the "Z" is not on battery power.

i've tried with the Z not on battery power and same bus power message...
(i'm trying with a usb multi reader, trying to read a 2Gb MemoryStick card)


ps: i've tried the same reader while adding an external 4ports powered usb hub and it works! so the checking seems really there


ps: my MSI BT USB dongle works without any problem...
« Last Edit: October 19, 2007, 05:40:54 pm by jpmatrix »
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun