I have a 64mb usb pen drive that wasnt working in
linux 2.6 kernel.
After some help from the net and trying out
various trial and error methods I could finally make
it work.
There was no complete HOWTO that worked. So I would
like to share
my experience.
Theory:
In theory if the kernel has scsi support and usb
support a usb pendrive should work.
But figuring out the right options in menuconfig is
tricky.
Environment:
Base OS: Redhat 8.0
Kernel: 2.6.1 downloaded from kernel.org
Steps that I followed:
Recompile kernel with these options chosen from
menuconfig:
Device Drivers ->
SCSI device support ->
<*>Support for usb,
[*] USB verbose debug mesage
<M>EHCI HCD
<M>OHCI HCD
<M>UHCI HCD
Device Drivers ->
USB support ->
<*> SCSI Device support
<M> SCSI disk support
[*] legacy /proc/scsi support
[*] Probe all LUNs on each SCSI drive
[*] Build with SCSI REPORT LUNS support
[*] Verbose SCSI error reporting ...
[*] SCSI logging facility
File Systems ->
DOS/FAT/NT File systems ->
<M> DOS FAT fs support
<M> MSDOS fs support
<M> VFAT (Windows 95) fs support
After booting the new kernel insert these modules:
modprobe vfat
modprobe sd_mod
modprobe usb-storege
modprobe uhci-hcd
modprobe ohci-hcd
NOTE1: The modules that used to be called as usb-uhci
and usb-ohci in 2.4
are called uhci-hcd and ohci-hcd respectively.
NOTE2: For modprobe, The modutils package doesnt work.
We have to install
the module-init-tools package.
run "tail -f /var/log/messages"
Now insert the pendrive in a usb port.
You should be able to see similar messages:
<<<< extract from /var/log/messages >>>>>>
Feb 10 14:45:47 localhost kernel: hub 1-0:1.0: new USB
device on port 1, assigned address 5
Feb 10 14:45:47 localhost kernel: usb 1-1: Product:
USB Flash Disk
Feb 10 14:45:47 localhost kernel: usb 1-1:
Manufacturer: Generic
Feb 10 14:45:47 localhost kernel: usb 1-1:
SerialNumber: ABCD006826
Feb 10 14:45:47 localhost kernel: scsi3 : SCSI
emulation for USB Mass Storage devices
Feb 10 14:45:47 localhost kernel: Vendor: Generic
Model: USB Flash Disk Rev: 0.0A
Feb 10 14:45:47 localhost kernel: Type:
Direct-Access ANSI SCSI revision:
02
Feb 10 14:45:47 localhost kernel: SCSI device sdb:
125120 512-byte hdwr sectors (64 MB)
Feb 10 14:45:47 localhost kernel: sdb: assuming Write
Enabled
-------- GOT IT !! /dev/sdb !!!
Feb 10 14:45:47 localhost kernel: sdb: assuming drive
cache: write through
Feb 10 14:45:47 localhost kernel: sdb:<7>usb-storage:
queuecommand called
Feb 10 14:45:47 localhost kernel: sdb1 sdb2 sdb4
Feb 10 14:45:47 localhost kernel: Attached scsi
removable disk sdb at scsi3, channel 0, id 0, lun 0
Feb 10 14:45:47 localhost kernel: Attached scsi
generic sg1 at scsi3, channel 0, id 0, lun 0, type 0
Feb 10 14:45:47 localhost kernel: Vendor: Generic
Model: USB Flash Disk Rev: 0.0A
Feb 10 14:45:47 localhost kernel: Type:
Direct-Access ANSI SCSI revision:
02
Feb 10 14:45:47 localhost kernel: SCSI device sdc:
2880 512-byte hdwr sectors (1 MB)
Feb 10 14:45:47 localhost kernel: sdc: assuming Write
Enabled
-------- GOT IT !! /dev/sdc !!!
Feb 10 14:45:47 localhost kernel: sdc: assuming drive
cache: write through
Feb 10 14:45:47 localhost kernel: sdc:<7>usb-storage:
queuecommand called
Feb 10 14:45:47 localhost kernel: sdc1
Feb 10 14:45:47 localhost kernel: Attached scsi
removable disk sdc at scsi3, channel 0, id 0, lun 1
Feb 10 14:45:47 localhost kernel: Attached scsi
generic sg2 at scsi3, channel 0, id 0, lun 1, type 0
<<<<< end /var/log/messages >>>>>>
In this case the pendrive had 2 partitions in it.
Now mount the 2 partitions:
mount -t vfat /dev/sdb /mnt/pendrive1
mount -t vfat /dev/sdc /mnt/pendrive2
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
--
To unsubscribe, send mail to [EMAIL PROTECTED] with the body
"unsubscribe ilug-cal" and an empty subject line.
FAQ: http://www.ilug-cal.org/node.php?id=3