Can we discuss about Kernel support USB storages device? Thanks.

Joern Abatz for-spam-only at abatz.de
Sun Feb 27 03:10:24 PST 2005


On Sat, 26 Feb 2005 09:37:40 +0800, Bluesheet wrote:

> During building the kernel, I found there have two situation failed in using
> USB drive/USB flash disk.
> 1/ Plug-in the USB drive/USB flash disk, the system didn't detect the
> device, so using "lsmod", didn't load usb-storage module.
> 2/ Plug-in the USB drive/USB flash disk, the system can detect the device,
> using "lsmod", usb-storage loaded into system, but when I mount the usb
> device, it occure " mount: /dev/sda1 is not a valid block device".
> 
> and loaded modules when the system being started.
>  Module                  Size  Used by    Not tainted
> ...
> usb-uhci                26348     0  (unused)
> ehci-hcd                20200     0  (unused)
> usbcore                 76288     1  [hid usb-uhci ehci-hcd]
> ext3                      72964     2
> jbd                       59288     2  [ext3]

Maybe there's a module missing for the file system on the USB disk. Maybe
it's vfat. And maybe, there are no partitions on it, so you can only mount
/dev/sda, not /dev/sda1.

I guess, as those USB modules are already loaded, a USB stick should
appear in /proc somewhere when you plug it in (/proc/bus/usb...?). Does it?

As far as I know, there are three ways to access the USB device then:

- load the modules manually (with modprobe)
- have them loaded automatically by the kernel
- have them loaded automatically by a daemon

For a storage device you need some USB modules and also some SCSI modules.
Look into Documentation/scsi and Documentation/usb in the kernel source
tree to find out what modules you need. Read the scsi.txt and
scsi-generic.txt, they cleared things up a bit to me.

I used USB only once yet, so I'm not the big expert here. I think you need
usb-storage, sd, and vfat. Maybe you need sg too, I don't know.

To make the kernel load modules automatically, you need 'alias' lines in
/etc/modules.conf (there's a man page for modules.conf).

I think the easiest way to access USB devices is a daemon like usbmgr or
hotplug.

Joern
-- 



More information about the lfs-support mailing list