Help - Search - Members - Calendar
Full Version: Usb Storage
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > Debian
jpmatrix
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? smile.gif
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? wink.gif
jpmatrix
QUOTE(ZDevil @ Oct 19 2007, 01:49 PM) *
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? wink.gif



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

rejected 1 configuration due to insufficient available bus power
...........
ZDevil
I got the same error when plugging in my Sony Ericsson w800i (which can function as a USB mass storage device).
jpmatrix
QUOTE(ZDevil @ Oct 19 2007, 03:31 PM) *
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 ?
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 ?????
tux
QUOTE(e.stoiber @ Oct 19 2007, 03:19 PM) *
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 ?????

cool.gif 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. smile.gif

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. cool.gif

tux
cool.gif
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.
biggrin.gif
tux
cool.gif 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
tux
cool.gif 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? tongue.gif

Cheers

cool.gif
tux
cool.gif 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. sad.gif

It's not all hopeless though, is it? biggrin.gif
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 !!
tux
QUOTE(e.stoiber @ Oct 19 2007, 08:58 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 !!

cool.gif looks like you have found some pointers to the problem. I expect there is a switch to turn off the checking somewhere! smile.gif

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

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. rolleyes.gif

I was surprised to find that a cheap CF reader worked without complaint! biggrin.gif 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. unsure.gif

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! blink.gif

Cheers for now

cool.gif
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.

jpmatrix
QUOTE(e.stoiber @ Oct 19 2007, 10:52 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.


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 smile.gif


ps: my MSI BT USB dongle works without any problem...
dlj0
QUOTE(jpmatrix @ Oct 19 2007, 08:58 AM) *
QUOTE(ZDevil @ Oct 19 2007, 01:49 PM) *
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? wink.gif



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

rejected 1 configuration due to insufficient available bus power
...........


I got that message at one time, then got a powered usb hub -- very convenient for multiple devices. But with debian I have been able to just plug in my usb keychain device, and it works. The proper modules just load, once I start ohci-hcd.

dlj0
QUOTE(jpmatrix @ Oct 19 2007, 09:49 AM) *
QUOTE(ZDevil @ Oct 19 2007, 03:31 PM) *
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 ?


I believe the limited power available to the usb port would be a hardware limitation, not something that could be re-configured.
dlj0
QUOTE(tux @ Oct 19 2007, 02:57 PM) *
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


Huh. Mine works fine with whatever fs (vfat, probably) that came on the thing. I guess you have managed to mount it successfully on another machine, but that would be worth testing. And, keeping the fs vfat makes the device usable on more machines.
ZDevil
QUOTE(dlj0 @ Oct 20 2007, 03:58 PM) *
I believe the limited power available to the usb port would be a hardware limitation, not something that could be re-configured.


But my Z can connect and use the SE w800i phone in pdaX without trouble, while there is a error showing not enough power in Debian. So I rather think it is not really hardware limitation in some cases.
tux
QUOTE(dlj0 @ Oct 20 2007, 03:03 PM) *
QUOTE(tux @ Oct 19 2007, 02:57 PM) *
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


Huh. Mine works fine with whatever fs (vfat, probably) that came on the thing. I guess you have managed to mount it successfully on another machine, but that would be worth testing. And, keeping the fs vfat makes the device usable on more machines.

cool.gif In fact, any device that actually works at all will work with whatever format is on it. I was just checking if there was a problem with the default partitions on the device. There are some that seem to have a system all of their own. rolleyes.gif

The interesting thing to me, was that the CF card reader worked. But I could only mount the CF card after I ran fdisk on /dev/sda. I didn't actually have to alter anything, just use it and quit. Then the CF card could be mounted. blink.gif

Some devices, like the swapped out 6GB drive, just hung when I ran fdisk. (Works fine in the CF slot.)

Strange happenings.

cool.gif
Marcin iwi Iwinski
I know that topic is quite old - but i'm having the "bus power" problem as well. I'm using sharp version of yongguns's 2.6.24. Did anyone find any solution ?
speculatrix
when I first started using linux on the desktop full time (oh, about 7 years ago) I was trying to use a particular memory card reader with a sony memstick, and it just wouldn't work. then I discovered I had to do some patches to the kernel - scary stuff - and it worked. I investigated and found that apparently many manufacturers did not create hardware that properly fulfils the USB specifications, but that Windows was very lax about enforcing any standards, and thus the manufacturers got away with it. This means that linux had to add kludges to allow the hardware to work.
I would hope that in theory things are better now, but quite possibly not.

So, it's quite possible that the hardware will work, but reports the wrong information to the Z, which assumes that the usb device isn't functioning, reports an incorrect error, and fails to fire it up?
Marcin iwi Iwinski
I've found something eventually smile.gif

http://www.oesf.org/forum/index.php?showto...&hl=pegasus
ZDevil
QUOTE(Marcin iwi Iwinski @ Mar 8 2008, 03:13 AM) *

Does this trick work?
radiochickenwax
QUOTE(ZDevil @ Mar 11 2008, 10:26 AM) *
Does this trick work?


Yes, this trick works... but it's kind of a pain to do this every time.

*EDIT*

I was thinking about trying to change the kernel configs for this reason. Does anyone know which line it is to change this behavior? Or is it not even the kernel?

*EDIT2*

Udev might be a good workaround, according to post #5 in the following:

http://ubuntuforums.org/showthread.php?p=3533694#post3533694

*EDIT3*

FWIW, there's a good deal of info at

http://www.mjmwired.net/kernel/Documentati...-management.txt
pelrun
The udev trick is the way to go, see my old post: http://www.oesf.org/forum/index.php?showto...st&p=177297
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.