PDA

View Full Version : usd pendrive, does it works?



Brite
03-13-2003, 09:31 AM
hi there, i bought a usb pen drive and when I run knoppix in my laptop it works fine. A /mnt/sda1 directory is created automatically end everything is fine.

But when i tried to use it in my PC it doesn't work.

i read dmesg :

usb.c registered new driver usb-storage
SCSI1: SCSI emulation for usb mass storage devices
Vendor: Name:
Type: Printer
usb m mass storage
Warning : USB mass storage data integrity is not assured
USB Mass Storage device found at 3
USB support registered

but ther isn't /mnt/sda1 and i cant read /dev/sda1 or anything

help please

rickenbacherus
03-13-2003, 09:44 PM
Add this to your fstab and it just might work:

/dev/sda1 /mnt/PenDrive vfat noauto,users,sync,rw 0 0

-OR-

/dev/sda1 /mnt/PenDrive usbdevfs noauto,users,sync,rw 0 0

You will have to mount the drive like this:

mount /mnt/PenDrive

Then just cd to that directory. Hopefully that does it.
Post back if it doesn't.

Brite
03-14-2003, 08:32 AM
i doesn't work.

When I try #mount /mnt/pen i get:
modprobe: cannot fin module block-major-8

and /mnt/pen doesn't get mounted. I also tried #mount -t auto /dev/sda1 /mnt/pen and got the same result.

I've tried loading kernel modules: sg (for SCSI generic control) and some usb related, like usb-ohci and usb-uhci (which purpose, beeing a clueless linux newbie with a poor understanding of english, don't really grasp). usb-ohci fails to load, while in my laptop, it gets loaded automatically at boot time.

I can get a full refund for this pen drive, should i take it back to the store or should I wait and continue trying?

rickenbacherus
03-14-2003, 01:44 PM
Sorry I think I forgot to tell you to make a directory first. DOH! You have to have a mount point. :)

mkdir /mnt/pen

Then add this to your fstab:

/dev/sda1 /mnt/pen auto defaults,noauto,users,sync,rw 0 0

The first mention of auto should cover all file systems, that way you don't have to specify fat32, vfat, etc. But you can certainly try different file system types.

Trying it this way again too.
mount -t auto /dev/sda1 /mnt/pen

Is your USB hub 1.10 or 2.0? This will have a bearing as to which driver needs to load.

You could also post the results of

sg_scan <--this will list all SCSI devices

&

sg_map<--this will determine the real identity of the SCSI devices.

USB mass storage devices are seen as just another SCSI drive. So are CD-R's. If you have a cd burner in your machine then your pen drive wouldn't be /dev/sda it would have to be at least /dev/sdb.

Post this too:

lsmod


I can get a full refund for this pen drive, should i take it back to the store or should I wait and continue trying?

Don't loose the chance to get a refund on my account! How long can you keep it before it has to be returned?

Brite
03-14-2003, 03:29 PM
Hey, thanks for your interest in helping me!!

I can get a full refund until March, 25th. Anyway this pendrive was so cheap I doubt i take the pain to go there for my money back ;)

Sure, I mkdir to create a mount point /mnt/pen, and tried with 'auto'. I just been home where i tried #mount -t usbfs /dev/sda1 /mount/pen . Funny the pendrive gets mounted! but instead of showing actual content (some jpgs and pngs) I see a couple of text files 'drivers' and 'devices' containing misc. manufacturer and device data ¿? There's also a 0001 folder with four files in it named 0001 to 0004 with indescipherable content (at least i cannot decipher it).

I'm at work now and will be travelling out until March, 24th so i cannot post lsmod results or anyother thing until then, but stubborn as i am I won't stop until i get it workin.

Too funny i've brough my knoopix CD to my office , and tried it in various PCs. The pen drive works everywhere but in my home PC, always using the same knoppix CD.

rickenbacherus
03-14-2003, 05:48 PM
If your drive is mounted then in /proc/bus/usb you should see two files 'devices' & 'drivers' and they should not be empty.


#mount -t usbfs /dev/sda1 /mount/pen

Have you tried changing the file system you are trying to mount-just a guess. That is:

#mount -t vfat /dev/sda1 /mount/pen
It probably wouldn't mount if you told it the wrong file type eh?
I've never had a pen drive but it really doesn't matter so much what it is as long as you are using the USB mass-storage driver.


I've tried loading kernel modules: sg (for SCSI generic control) and some usb related, like usb-ohci and usb-uhci (which purpose, beeing a clueless linux newbie with a poor understanding of english, don't really grasp). usb-ohci fails to load, while in my laptop, it gets loaded automatically at boot time.

The usb-ohci is for USB 1.1 and the usb-uhci is for USB 2.0. When you look at dmesg look at how it tries to load different USB drivers but will find 'no device uses' said driver. It should successfully load the mass storage driver. lsmod will tell you which drivers loaded and if they are in use. You should ALWAYS see usb-core (nothing works without it)and then either, 'ohci' or 'uhci' and the mass-storage driver. Make sense?

So what is your PC - does it havs USB 2.0? IF so it will only need the usb-uhci.
Does it have a cd burner? If it does you will need to mount the next scsi device /dev/sdb1 That is where sg_scan comes in. It will tell you what scsi devices you have.

Good luck.


a clueless linux newbie with a poor understanding of english

English seems ok to me. :D

Brite
03-14-2003, 07:14 PM
ok. Now about my system. It's and old P3 500 MHz with two hard drives (hda & hdb) a DVD and a CDRW unit. I don't think it has USB 2, and i wasn't even sure it had USB at all until I checked :)

I thought i have posted it already but it doesn't hurt to insist. When i try to mount using vfat or auto filesystem, i get:

modprobe: can't locate module block-major-8
mount: /dev/sda1 isn't a valid device (in fact it says : "/dev/sda1 no es un dispositivo válido", so it may differ slightly in english)

definitely i have usb-storage module loaded. I don't know for sure but i think i tried to mount /dev/sda1, sda2, sda3 ... and also sdb1, sdc1 sdd1... just in case , my PC has two USB slots and i didn't know how the system would name each one ^^


ok.. counting the minutes to go for my holiday week, so I won't post for a while. I know you'll be there when i get back looking for a little more of help. Thank you very much.

rickenbacherus
03-14-2003, 09:03 PM
hard drives (hda & hdb) a DVD and a CDRW unit.

hard drives
-hda
-hdb

DVD
-hdc

CDRW
-sda

USB PEN DRIVE
-sdb

Linux sees CDRW as a SCSI device (actually it runs under emulation). At any rate it would be your first SCSI drive so your USB device would be sdb.

Have a good holiday.

tsaelee
03-15-2003, 09:29 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.

rickenbacherus
03-15-2003, 03:50 PM
what does

lsmod

tell you?

tsaelee
03-16-2003, 05:30 AM
I will definately post complete lsmod listing. I don't have that drive with me today, it's at my work.

Brite
04-01-2003, 11:37 AM
LSMOD:
-----------------------------------------------------
Module Size Used by Not tainted
autofs4 8660 1 (autoclean)
af_packet 13416 0 (autoclean)
nls_cp437 4380 1 (autoclean)
es1371 31944 0
gameport 1324 0 [es1371]
ac97_codec 9800 0 [es1371]
soundcore 3396 4 [es1371]
8139too 14664 0
mii 1008 0 [8139too]
agpgart 31136 0 (unused)
serial 51908 0 (autoclean)
usb-storage 48440 0
usb-uhci 21644 0 (unused)
usbcore 56736 1 [usb-storage usb-uhci]
apm 9644 0 (unused)
rtc 6940 0 (autoclean)
cloop 23396 1
----------------------eof-----------------------------------


I found some command which gave me the following result. (shame on me i don't remember which command it was :( )

------------------------------------------------

Bus 001 Device 001: ID 0000:0000 Virtual Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0000 Virtual
idProduct 0x0000 Hub
bcdDevice 0.00
iManufacturer 0
iProduct 2 USB UHCI Root Hub
iSerial 1 e000
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x40
Self Powered
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 8
bInterval 255
Language IDs: (length=4)
0000 (null)((null))

Bus 001 Device 002: ID 067b:2315 Prolific Technology, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x067b Prolific Technology, Inc.
idProduct 0x2315
bcdDevice 0.01
iManufacturer 1 Taiwan Tai-Hao
iProduct 3 USB Flash Disk Embedded Hub
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
wMaxPacketSize 64
bInterval 15
Hub Descriptor:
bLength 9
bDesriptorType 41
nNbrPorts 2
wHubCharacteristic 0x0d 0x00
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 100 milli Ampere
DeviceRemovable 0x06
PortPwrCtrlMask 0x06
Language IDs: (length=4)
0409 English(US)
[more text snipped; Bus 001 devices 003 and 004 shows just the same as device 002]
-+---------------------------------------------------


anyway i cannot mount this flash pen drive, using sd[a-z][1-9]. Maybe i should try to format it under linux (it came preformatted) but i don't really know how, or if it would be a good idea.

Another option is just wait until i can dl latest knoppix version and try it then (cross fingers)

rickenbacherus
04-02-2003, 08:44 PM
Bus 001 Device 001: ID 0000:0000 Virtual Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.00

This make me wonder about compatibility with USB 1.0
Maybe it makes no diference.

Brite
04-03-2003, 09:16 AM
Ok, I guess it's time to give up. Thanks, rickenbacherus, por your instructive help. At least I've learned some things which may be useful some day. Or maybe this drive will work with knoopix 3.2 or maybe I buy a new USB 2 card...

Bye (for now) and thanks again.

rickenbacherus
04-03-2003, 01:15 PM
Sorry we couldn't get it working. I'm still looking for something (anything at all) on USB 1.0 so who knows.

gcoker
04-03-2003, 03:22 PM
I have used a bunch of USB and PCMCIA drives. I scanned the posts for this one. I might have missed it, but be sure to create the mount point on your file system where the drive is to go. I always want to fstab to a place that does exist. Editing fstab will work or not work depending if the mount point exists.

molocha
04-04-2003, 05:06 AM
#mount -t usbfs /dev/sda1 /mount/pen

just wanted to clarify something...

if you try to mount ANYTHING with the usbfs filesystem, what you will get is a clone of /proc/bus/usb. in other words, it's like trying to mount proc on another dir. that's why you get some strange files like "devices" and "drivers".

gcoker
04-04-2003, 05:58 PM
The USB devices that I have connected in my system all came configured as DOS fs and I have always mounted them (sucessfully and easily) as DOS fs devices. The USB device was only 16 Meg. (It was for a project that only required a couple of Meg.) I was using RH 8 at the time. This is using 2.4.18-14 as the kernel. We tried a bunch of PCMCIA and USB devices. They all hand DOS or vfat fs on them for interchangability. RH uses some non-standard kernel patches. Looking at Knoppix, I would not expect it to act very different. Of course, it is dependent on the fs on the device, and it is my limited experience. Compared to getting other devices working with Linux, I have spent more time on these emails that I have getting my USB going. Just lucky so far, I guess.

rickenbacherus
04-05-2003, 01:32 AM
Got something for you to try out Brite. I wish I had a USB 1.0 something so I could try it myself. Anyway....... try adding this to
your /etc/modules.conf after the line that reads
#Name inconsistency in 2.4 kernel series
alias usb-interface usb-uhci

and of course.......let us know.