LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   USB Flash Drive not detected (https://www.linuxquestions.org/questions/slackware-14/usb-flash-drive-not-detected-175227/)

kamransoomro84 04-27-2004 03:50 PM

USB Flash Drive not detected
 
Hi. I have a 128MB Flash Disk that I used to mount on Red Hat and it worked fine. But now, after I've installed Slackware, it isn't detected. I tried a friend's USB but that doesn't work either. I have enabled UHCI support in 2.6.4. Still it doesn't work. Please help me.

amos 04-27-2004 04:05 PM

You might need to look at your fstab settings.

Cheers
Amos

kamransoomro84 04-27-2004 07:33 PM

No, its not that. Because I've tried fdisk. It used to show my USB as /dev/sda4. But now it doesn't. Even Slackware did at first. But I had to reinstall it and now it doesn't.

tank728 04-27-2004 10:19 PM

try this as root of course
Code:

tail -f /var/log/messages
That should show you that a new device was connected, and where it was connected. Then you can mount it with mount /dev/sdXX /mnt/flashdrive. If this does not work then there is something missing in your kernel or your hotplug might not be running. You mentioned that you had UHCI support, that is good because you do need that, but what about SCSI. You need SCSI, and Mass Storage Device (or something like that) Mass Storage Device is under the SCSI tab in the kernel menu. Hope that helps.

-tank

davidsrsb 04-28-2004 12:50 AM

/dev/sda4 is unusual, it is normally /dev/sda1

kamransoomro84 04-28-2004 02:58 PM

That may be so. But it did. Today I tried mounting it on another system running Slackware. There it was mounted as /dev/sdb4. Anyway, yes the kernel does detect it, but still it doesn't mount it or show it as /dev/sda4. And yes, I do have Mass Storage support because dmesg does show the kernel initializing it. One thin more, I tried a friend's USB, but that didn't work either. Also, each time I plug in my USB, it is allotted a different address according to dmesg. Another thing that may be relevent is that fdisk shows a /dev/hda2. Problem is, I don't have a /dev/hda2. All my partitions are accounted for. When I try to mount it, it says error guessing file system type. Manually specifying the file system doesn't work either. I am at a total loss as to what to do.

tank728 04-28-2004 05:38 PM

Does your flash drive require drivers, because I have an iomega that does not and that is the reason that mine works. Did you flash drive come with a cd? Some flash drives just do not play well with linux.

-tank

urka58 04-28-2004 06:53 PM

USB drives use a special usb-scsi host emulation to be recognised by the system
Try as root
cdrecord -scanbus
this dectect "pseudo" scsi device as well.
then if you get your device in the list
try
mount -t vfat /dev/sda1 /mnt/something ===== instead of vfat ,auto can also be used
"something" must be created first by
mkdir /mnt/something.
It would be very unusual your pendrive is detected as sda4 unless you have a "full"scsi system
Ciao

usercsr 04-28-2004 07:42 PM

I am also having problems mounting the flash drive. This is what i did :

Code:

cdrecord -scanbus
Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 J�rg Schilling
Linux sg driver version: 3.5.30
Using libscg version 'schily-0.7'
scsibus0:
        0,0,0    0) 'Sony    ' 'MSC-U03        ' '1.00' Removable Disk
        0,1,0    1) *
        0,2,0    2) *
        0,3,0    3) *
        0,4,0    4) *
        0,5,0    5) *
        0,6,0    6) *
        0,7,0    7) *
scsibus1:
        1,0,0  100) 'USB    ' 'Flash Drive    ' '2.00' Removable Disk
        1,1,0  101) *
        1,2,0  102) *
        1,3,0  103) *
        1,4,0  104) *
        1,5,0  105) *
        1,6,0  106) *
        1,7,0  107) *

mount -t vfat /dev/sda1 /mnt/flash/
mount: /dev/sda1 is not a valid block device

mount -t auto /dev/sda1 /mnt/flash/
mount: /dev/sda1 is not a valid block device

am i doing anything wrong?

davidsrsb 04-29-2004 02:31 AM

Flash drives are not always shipped formatted. I have a new Apacer STENO and this was raw. Either format it on a Windows machine with FAT/FAT32 or fdisk it to ext2

fasta 04-29-2004 04:46 AM

Same prob here.
Got myself a freecom usb stick 256mb. Under 2.4.x kernel I mounted NO PROBLEM with
Code:

mount -t auto /dev/sda /mnt/flash
NOTICE :"/dev/sda" ... NO SCSI ID... that surprised me too, yes. I perfectly could read all the stuff I wrote on it from winXP...

Since I compiled 2.6.1 (with all the usb, scsi and ub-storage supports) theres no way of making it work...

alekoos 04-29-2004 10:23 AM

2.6.4 and i believe prior versions had some problem with the usb devices under the /sys mount point.Upgrade to 2.6.5
dmesg will show you at which sdaXX your usb drive is.But be sure to have the appropriate kernel supprort compiled. :o

/flame mode on
And yes Slackware can be more educational :study: that other distros ;)
/flame mode off

kamransoomro84 04-29-2004 10:49 PM

Guys, you still don't get it. I think you missed my earlier posts. My USB used to work fine on Slackware kernel 2.6.4. But I had to reinstall and now it doesn't. I have already upgraded to 2.6.5, and no, my USB does not need drivers. I'll try the cdrecord thingy today. Also, it may be unusual, but my USB is recognised as /dev/sda4. It was recognized as such on Red Hat, it was recognized as such on Slackware before and it was recognized as /dev/sdb4 on another system running Slackware. Oh and dmesg does tell me that a USB Mass Storage device was plugged in, and as far as the address was concerned, it changes every time I plug it in. Oh and my USB works fine on Windows.

kamransoomro84 04-30-2004 08:42 PM

Hey thanks guys. USB is working now. I hadn't compiled SCSI generic drive support. And again, its /dev/sda4. Anyway, one thing I don't understand, it didn't work in 2.4.22 either. Whereas SCSI support is enabled there. Care to comment on that?

usercsr 04-30-2004 10:05 PM

hey, how do we mount the flash drive so that it is accessible to a particular user. i am able to mount the drive and use it only as the root.
thanks


All times are GMT -5. The time now is 07:28 AM.