PDA

View Full Version : rickenbacherus, you seem very knowledgable, please help



tsaelee
03-15-2003, 09:28 AM
I have the exact same problem with my SOYO Cigar Thumb drive, it's a 64MB piece. My system picks up the drive but I don't think it loads the driver for it. If I cat /proc/bus/usb/drivers/0.. or /1.., it shows that the drive is indeed detected.. but system does not translate from there to a "sda" or "sdb" device. How do I go about manually mounting or translating from there to a "sda" or "sdb" device?

I have tried 'echo "add single-device 0 0 1 0" > /proc/scsi/scsi' to no avail. Please advise on correct usage. Normally if driver is loaded for a device, specifically an emulated device, you can 'cat /proc/scsi/scsi' and it would list all devices loaded, including any cd-rom drives.

Please help. I've been stuck on this for over half a year and no one is able to assist. I lost hope. I now find you and I believe you can shed some light into this.

Thanks in advance.

rickenbacherus
03-16-2003, 05:20 AM
I'm flattered but probably not anywhere near as knowledgeable as you may hope. :D

First do this:

modprobe usb-storage

then do:

lsmod

You need to see three things-
-usbcore
-usbohci -OR- usbuhci
-usb-storage.

If you've got them then on we go. Post the output of:

cdrecord -scanbus

Post back with results and we'll go from there.

tsaelee
03-17-2003, 05:21 PM
Hi, this is my complete lsmod listing.

usb-storage 54460 0 (unused)
autofs4 8724 1 (autoclean)
cloop-mod 23716 1
af_packet 13480 0 (autoclean)
agpgart 34752 0 (unused)
i810_audio 23112 1
ac97_codec 9992 0 [i810_audio]
soundcore 3396 2 [i810_audio]
3c59x 25808 2
serial 51908 0 (autoclean)
usb-uhci 21868 0 (unused)
usbcore 57120 1 [usb-storage usb-uhci]
apm 9644 1
rtc 6940 0 (autoclean)
cloop 5456 1

tsaelee
03-17-2003, 05:45 PM
T: Bus=02 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=a000
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
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=a400
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
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1
P: Vendor=0aec ProdID=5010 Rev= 1.00
S: Manufacturer=
S: Product= USB Storage Device
S: SerialNumber=0AEC301000001A00
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

rickenbacherus
03-17-2003, 09:56 PM
Hi, this is my complete lsmod listing.

usb-storage 54460 0 (unused)
usb-uhci 21868 0 (unused)
usbcore 57120 1 [usb-storage usb-uhci]
This looks good-everything as it should be.
usb-storage is your mass storage driver.
usb-uhci is your hub driver.
usbcore- pretty self explainatory.


C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=

From this we see that the device is indeed recognized. EXCELLENT! In case you are curious here is a little info on what you are seeing:
Cls=08(stor) <-this is the CLASS and indicates a mass storage device.
Sub=06 <-this is the SUBCLASS and 06 indicates a SCSI device.
Prot=50 <-this is the PROTOCOL and indicates bulk.

I would do two things here:
Try adding the following to:

/usr/src/linux/drivers/usb/storage/unusual_devs.h

**this path may be wrong as I am not at my Linbox right now**

UNUSUAL_DEV( 0x0aec, 0x5010, 0x0100, 0x0100,
"Soyo Technologies Corp.",
"Soyo CigarPro Flash Memory Drive",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY),

Have you ever successfully connected this device to any other machine or have you only tried it on your Linbox?
If you've never connected it then surely it isn't formatted. If it isn't formatted then I don't think you could mount it.
Using sfdisk, you can find out which drive letter it's been assigned and get the info you need to format it all at the same time.

sfdisk -l /dev/sda
sfdisk -l /dev/sbd
sfdisk -l /dev/sdc

.....and so on. I have used '/dev/sda1' throughout so just be sure to insert your drive letter if it is different. AND if you have any other SCSI disks make sure you don't format the wrong one or - well you get the picture. :)

So go ahead and format it (I think FAT16 or FAT32 should be fine)but make note of this: DOS bites us in the arse. Quote from man sfdisk-"DOS FORMAT expects DOS FDISK to clear the first 512 bytes of the data area of a parti*tion whenever a size change occurs." I interpret this to mean that if you use DOS fdisk then you'll have no problems. If you don't have access to a DOS machine that you can use to partition the drive then partition with sfdisk, reboot so the partition table is written to the disk and then:

dd if=/dev/zero of=/dev/sda1 bs=512 count=1

That should zero out the first 512 sectors.

Next make a directory that you want to mount the drive to (if you haven't already).

mkdir -p /mnt/pendrive
then mount it
mount -t auto /dev/sda1 /mnt/pendrive

Note that I suggest the 'auto' flag instead of specifying a file system. Hopefully that does it. Then just do a:

cd /mnt/pendrive

If you need assistance with symlinks here is a really cool program called 'devlabel' It claims to be able to keep track of symlinks and drive letter assignments for you.

http://www.lerhaupt.com/linux.html

I might have a few more ideas if these don't do it for you. If you do need more assistance check your documentation and see if the Vendor I.D. and Product I.D. are listed. Good luck! :D

tsaelee
03-17-2003, 11:34 PM
Thank you, thank you!

That's the step I was missing. I will add those lines to unusual_devs.h file. Do I need to recompile? (I'm totally clueless)

Yes, I am currently using this thumb drive on a Dell laptop with SuSE 8.1 - it detects and mounts drive correctly.

Again, thank you.

rickenbacherus
03-18-2003, 12:09 AM
I don't see why you'd need to recompile but I'm wrong at least 3 or 4 times a day. :D If you're already using it then you shouldn't need to reformat either (of course you probably knew that). Lemme know how it goes. :cool:

tsaelee
03-19-2003, 12:05 AM
Inserted and triple check, still no 'sda' device.

Here's the 'dmesg':

usb-storage: act_altsetting is 0
usb-storage: id_index calculated to be: 89
usb-storage: Array length appears to be: 91
usb-storage: USB Mass Storage device detected
usb-storage: Endpoints: In: 0xc7f98e74 Out: 0xc7f98e60 int: 0x00000000 (Period 0)
usb-storage: Found existing GUID 0xaec50100aec301000001a00
WARNING: USB Mass Storage data integrity not assured
USB Mass Stroage device found at 7

Hmm, it is interesting. If you can give any pointers that'll be great, if not that's a big deal. I may have to just give up.

What do you think if I copy unusual_devs.h file from my SuSE 8.1 system to the KNOPPIX system? Would that work?

tsaelee
03-19-2003, 12:09 AM
What does 0x0100, 0x0100 mean in 'UNUSUAL_DEVS( 0x0aec, 0x5010, 0x0100, 0x0100, ?

thanks

rickenbacherus
03-19-2003, 12:19 AM
What do you think if I copy unusual_devs.h file from my SuSE 8.1 system to the KNOPPIX system? Would that work?

I suppose there's only one way to find out. It would be interesting to see the difference. Without any reference to go by I really just guessed at that one I posted.I don't know the first thing about SuSE. If it doesn't work post these outputs:
cat /proc/scsi/scsi
cdrecord -scanbus
dmesg | grep scsi

and your fstab please. I wish I had a pendrive to experiment with but I have no need for one.

rickenbacherus
03-19-2003, 12:20 AM
What does 0x0100, 0x0100 mean in 'UNUSUAL_DEVS( 0x0aec, 0x5010, 0x0100, 0x0100, ?

thanks

Vendor & product I.D. Those are also a "best guess" Maybe your pendrive documentation has them or your SuSE unusual_dev file.

editfrom waht I say at the SOYO site they really don't care much about Linux. Maybe I looked in the wrong place.

tsaelee
03-19-2003, 01:10 AM
cat /proc/scsi/scsi --> said no device attached

cdrecord -scanbus --> cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.

dmesg | grep scsi --> scsi 0: SCSI Emulation for USB Mass Storage devices
usb-storage: scsi cmd done, result=0x2


will try SuSE's unusual_devs and see what happen.

rickenbacherus
03-19-2003, 03:07 AM
What drives do you have in your system?

Post this:
lsmod

tsaelee
03-19-2003, 05:52 PM
it's interesting. I do have a generic ATA cd-rom drive, but 'cat /proc/scsi/scsi' shows no drives connected.

lsmod list as posted above.

tsaelee
03-19-2003, 05:53 PM
unusual-devs.h from SuSE didn't work either (was a silly idea).

rickenbacherus
03-19-2003, 08:11 PM
unusual-devs.h from SuSE didn't work either (was a silly idea).

Not really -I have fixed my system by looking at other configurations before for sure.


it's interesting. I do have a generic ATA cd-rom drive, but 'cat /proc/scsi/scsi' shows no drives connected. - AHA! that's it!

cat /proc/scsi/scsi won't necessarily show a standard cdrom as a scsi device-unless scsi emulation is enabled. If you had a cd-burner installed when you installed Knoppix it would have by default enabled scsi emulation then your standard cdrom would be listed as a scsi device. Since you had no devices requiring scsi emulationon install then it is not enabled. You need to enable scsi emulation my friend.

I'm at work and unfortunately chained to an almost worthless windoze box so I may not be much help but post your lilo.conf file if you would.

tsaelee
03-19-2003, 09:30 PM
We'll enable scsi emulation and let see what'll happen. thanks again.[/list][/quote]

rickenbacherus
03-19-2003, 10:04 PM
It should be fairly easy to see if it will work like so:

edit your lilo.conf file to include sda=ide-scsi. It might look like this:

append= "hda=ide-scsi hdb=ide-scsi sda=ide-scsi"

Don't change anything just add "sda=ide-scsi" to it.

Then

modprobe ide-scsi
modprobe scsi-mod

I haven't tried it myself but I think that's it.

tsaelee
03-20-2003, 12:11 AM
inserted append = "sda=ide-scsi" to lilo.conf

still no "sda" device when 'cat /proc/scsi/scsi'

modprobe ide-scsi --> no error
modprobe scsi-mod --> unable to locate module... i assume you meant "scsi_mod" - yeah, that's in there too.

will try JML 256MB Thumb Drive and see what'll happen. If all these work, will submit to be included for everyone to use.

Thanks.

tsaelee
03-28-2003, 11:26 PM
Thanks for all of your help. What I found out was that we do indeed need to recompile and create a customized kernel. I haven't have the chance to do that yet. Will keep you all posted.