Differences between revisions 11 and 12
Revision 11 as of 2005-12-20 06:53:50
Size: 5613
Editor: PeMac
Comment:
Revision 12 as of 2009-03-16 03:36:11
Size: 5613
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
["Hardware"] > ["USB"] / ["BootUsb"] [[Hardware]] > [[USB]] / [[BootUsb]]
Line 6: Line 6:
DEVICE: LEXAR JUMPDRIVE ["250MB"] DEVICE: LEXAR JUMPDRIVE [[250MB]]
Line 18: Line 18:
see also: ["USBCamera"] see also: [[USBCamera]]
Line 40: Line 40:
["bash"]/# mount -t usbdevfs none /proc/bus/usb
["bash"]/# mount
[[bash]]/# mount -t usbdevfs none /proc/bus/usb
[[bash]]/# mount
Line 91: Line 91:
["bash"]\# mount /mnt/usbstore [[bash]]\# mount /mnt/usbstore
Line 123: Line 123:
So, it worked, but when plugging the ["USBStorageDevice"] into port, it did not always mount. So, it worked, but when plugging the [[USBStorageDevice]] into port, it did not always mount.

Hardware > USB / BootUsb


In order to retrace the steps that I did to use the "usb mass storage" device on my Compaq Armada 1500c Laptop. SYSTEM: Debian/GNU (sarge/testing/unstable in May 2004) last software upgrade February 2004 KERNEL: 2.4.18 DEVICE: LEXAR JUMPDRIVE ?250MB

I think that this should also apply for any 2.4 kernel but might be problematic with 2.6 kernel (which has something better...) I was confident that I could make it work.

Then I had many trials and did not succeed with it. I have checked the USB-Digital-Camera HOWTO and tried to use this as a starting point after not succeeding by mounting it just as an ordinary drive.

I recommend reading this USB-Digital-Camera-HOWTO first because most of my efforts were based on this work by Dave Kelly.

In the process of this I created a directory as mountpoint for the storage-device-filesystem. I called it "usbstore" as root it might as well be called "/mnt/camera" or "/mnt/flash"

see also: USBCamera

However the USB-storage stick did not work in the same way. I have tried the scripts but I only got a message that this is not a valid block-device if I tried to mount it with the same commands.

I read up on some articles:

which indicated that the flash is not so easy to do under debian additionally the second article describes someone having similar problems with a similar device:

  • mount: no medium found

or

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


After playing around for a while with the same error messages, I tried the recommendations from the Documentation that I found in my Kernel-source tree: /usr/src/kernel-source-2.4.18/Documentation/usb/proc_usb_info.txt this was helpful and provided me with another indication:

?bash/# mount -t usbdevfs none /proc/bus/usb ?bash/# mount none /proc/bus/usb type usbdevfs (rw)

I found in /proc/bus/usb the following three files: 001/001 (001 in directory 001) devices drivers

the content of devices:


  •  T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
     B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
     D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 ["MxPS"]= 8 #Cfgs=  1
     P:  Vendor=0000 ["ProdID"]=0000 Rev= 0.00
     S:  Product=USB UHCI Root Hub
     S:  SerialNumber=1000
     C:* #Ifs= 1 Cfg#= 1 Atr=40 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"]=   8 Ivl=255ms


so this was basically empty...

drivers/modules that I had installed (first with modprobe, later with modconf):


         usbdevfs
         hub
         usb-storage


information in /proc/scsi/scsi:


attached devices: none



so this did not work at all, but I have used the same entry in fstab and I mounted the thing, before. what happened? I remember that I loaded some modules with modprobe, before it worked, there were the modules:


  • msdos umsdos sg (scsi-generic) usb-storage (loaded at start-up already)


the next day

  • I restarted the Computer without the device plugged in, and it just mounted after entering the command:

?bash\# mount /mnt/usbstore

an item on the desktop showed up: usbstore which let me open a nautilus window on doubleclick. excellent!


So why did it not work before?

I started the computer with the device plugged in (and my entry in fstab for the device being:

  • /dev/sda1 /mnt/usbstore vfat rw,user,auto 0 0

However when I typed "mount" it showed something like

none on /proc/bus/usb type usbdevfs (rw)

I found a section in /etc/init.d/mountkernfs that is automatically loading a usbdevfs in /proc/bus/usb on startup if there is one available, but this is not useful, because I cannot read or write to it this way. I have now commented out this section of the file so that on startup instead the fstab should be used which is now:


  • # /etc/fstab: static file system information. #

    # <file system> <mount point> <type> <options> <dump> <pass>

                  /dev/hda2            /                ext2      errors=remount-ro  0         1
               /dev/hda3              none              swap         sw                 0         0
                 proc                  /proc               proc          defaults          0         0
               /dev/fd0            /mnt/floppy           vfat     rw,user,noauto     0         0
              /dev/cdrom        /mnt/cdrom         iso9660 ro,user,noauto     0         0
               /dev/sda1          /mnt/usbstore      vfat      rw,user,auto        0         0


So, it worked, but when plugging the USBStorageDevice into port, it did not always mount. opening the normal shell tty1 (Alt-Ctrl F1) gave some more information: it sometimes said that the device was not accepting the device-number. but I cannot always reproduce this information (of course not now, when I want to show it).... plugging and unplugging several times worked, until the message:

 hub.c: New device detected on bus 1/1 assigned bus number /3/4/5/ (any number)

2