LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   USB drive not working (https://www.linuxquestions.org/questions/debian-26/usb-drive-not-working-340500/)

bp12345 07-06-2005 04:32 AM

USB drive not working
 
I am using Debian 3.1 and it won't recognise my USB drive. I probably need to edit my fstab file, but how? I tried /dev/sda1, and /dev/sb1 but nothing happened. Using MEPIS or Kubuntu it automatically detected and mounted it. When I look in my /dev/ folder, there is no sda1 or sb1 device. The USB drive works fine with other distributions, and under Windows, but only in Debian does nothing happen.

m_yates 07-06-2005 07:15 AM

Here is how my fstab entry is set up for my flash drive:
Code:

/dev/sda1      /mnt/sda1      vfat noauto,users,owner,exec,umask=000 0 0
I can mount the drive as a normal user from the command line using the command:
Code:

mount /mnt/sda1
after plugging in the drive.

You can check to see if the drive is recognized using the command "dmesg" after plugging it in. Sometimes I have to wait ~20 seconds or so before my drive is recognized.

bp12345 07-06-2005 01:00 PM

Thanks, but it still doesn't work.
I added the line exactly as above to fstab, but

When I try:
Code:

bp@localhost:/$ mount /mnt/sda1
I get:
Code:

mount: special device /dev/sda1 does not exist
When I go to /dev/ there is nothing (no device or file of any type) called sda1 in it.

m_yates 07-06-2005 01:15 PM

Plug in the drive, then wait a few seconds and run "dmesg". In my case, dmesg output gives:
Code:

sda: assuming Write Enabled
sda: assuming drive cache: write through
SCSI device sda: 1023488 512-byte hdwr sectors (524 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
SCSI device sda: 1023488 512-byte hdwr sectors (524 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
 /dev/scsi/host0/bus0/target0/lun0: p1
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Perhaps in your case, it is a different device directory.

bp12345 07-08-2005 03:26 AM

When I run dmesg, I get:

Code:

usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
ACPI: PCI interrupt 0000:00:10.0[A] -> GSI 11 (level, low) -> IRQ 11
uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
PCI: Setting latency timer of device 0000:00:10.0 to 64
uhci_hcd 0000:00:10.0: irq 11, io base 00001020
uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.1[B] -> GSI 9 (level, low) -> IRQ 9
uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
(#2)
PCI: Setting latency timer of device 0000:00:10.1 to 64
uhci_hcd 0000:00:10.1: irq 9, io base 00001040
uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.2[C] -> GSI 11 (level, low) -> IRQ 11
uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
(#3)
PCI: Setting latency timer of device 0000:00:10.2 to 64
uhci_hcd 0000:00:10.2: irq 11, io base 00001060
uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 3
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
PCI: Enabling device 0000:00:10.3 (0010 -> 0012)
ACPI: PCI interrupt 0000:00:10.3[D] -> GSI 9 (level, low) -> IRQ 9
ehci_hcd 0000:00:10.3: VIA Technologies, Inc. USB 2.0
PCI: Setting latency timer of device 0000:00:10.3 to 64
ehci_hcd 0000:00:10.3: irq 9, pci mem e0b1c400
ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 4
ehci_hcd 0000:00:10.3: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 6 ports detected
...
usb 4-1: new high speed USB device using address 2
usb 4-1: control timeout on ep0out
ehci_hcd 0000:00:10.3: Unlink after no-IRQ?  Different ACPI or APIC settings may help.
usb 4-1: control timeout on ep0out
usb 4-1: device not accepting address 2, error -110
usb 4-1: new high speed USB device using address 3
usb 4-1: control timeout on ep0out
usb 4-1: control timeout on ep0out
usb 4-1: device not accepting address 3, error -110
usb 4-1: new high speed USB device using address 4

I don't know how much is useful to fix the problem, but I can't find something more similar to the output of your dmesg.

bp12345 07-17-2005 11:48 AM

Anyone?
Where could the USB device be located? In '/proc/bus/usb'? When I search for all block devices in konqueror, all I get is my hard drive partitions, cd drive, some shortucts to the other devices and a whole bunch of memory devices. If there is no sda1, can I create one? If so, how?
Thanks

grant-skywalker 07-17-2005 10:11 PM

This is how usb drive works for me :-

mount -t auto/msdos /dev/sda1 /mnt/pen

Just create a directory under /mnt (pen is the directory).
One thing to note is i can't use -t vfat, and i don't know why. I tried -t auto or -t msdos
works.

Hope it helps

bp12345 07-18-2005 01:59 AM

But there is no 'sda1' in /dev/ . The only block devices there are the hard drives and a bunch of memory devices. sda1 , sda2 , sdb1 and so on don't even exist as a file. Editing fstab is not the froblem. I have to get or find the device directory, or make one, not the mount point. How do I make one (if it is possible)? Or what do I use instead?

grant-skywalker 07-18-2005 02:56 AM

Hi,

This is my last portion of dmesg, yours should show the same or similar

=======================================================
usb 3-5: new high speed USB device using address 3
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: Model: USB FLASH DRIVE Rev: 1.01
Type: Direct-Access ANSI SCSI revision: 02
USB Mass Storage device found at 3
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
SCSI device sda: 253952 512-byte hdwr sectors (130 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
/dev/scsi/host0/bus0/target0/lun0: p1
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
======================================================

What i did was to su into root and type #mount -t msdos /dev/sda1 /mnt/pen

Have you tried and it doesn't work??

What i'd suggest is that you do a dmesg first, hang in there, then plug in your
pen drive, check on dmesg again to see what has been 'added'. Meaning that
you could open 2 console at the same time to see the effect .

Let us know what's the status so far.
Cheers

zyuadl 07-18-2005 08:55 PM

try /dev/sda instead of /dev/sda1
I have two flash drives. One works with /dev/sda and the other works with /dev/sda1. I don't know why.

smu 07-21-2005 02:40 PM

I was having similar problems. Make sure that you are using a 2.6 kernel. The 2.4 kernel that comes with Debian 3.1 (Sarge) won't allow USB drives.
Do:
apt-get install kernel-image-2.6-386

Reboot your machine, and choose the 2.6 kernel. If that doesn't make it work, try this from DebianHelp.org:
http://www.debianhelp.org/modules.ph...ticle&sid=3529

bp12345 07-23-2005 05:15 AM

I am using a 2.6 kernel, but it is for k7 (AMD Athlon). Should I use a 'normal' 386 kernel? Also, how do I edit/add modules to the kernel? It is a laptop and it doesn't have full APM or ACPI support. Or should I recompile the kernel? And how would I do that? In the KDE Control Center there is an item called 'linux kernel' or something like that, but I apparently I don't have the source code.

smu 07-23-2005 03:23 PM

Yes, the 386 kernel is what you should be using (there may be one optimized for your processor, but the 386 should work). Did you try the link that I posted?

ironwalker 07-23-2005 03:51 PM

His kernel is fine as long as he has an amd processor no need to switch to i386.


http://www.xs4all.nl/~bsamwel/usb_st...on_debian.html

If you dont have "hotplug" installed ....install it.It will save you lots of headaches.

bp12345 08-04-2005 05:58 AM

Thanks everybody.
I loaded the 'hotplug' and 'usb-storage' modules into the kernel, and now it works fine. I guess I thought they loaded automatically and there was a problem with /etc/fstab and /dev/. Now everything works just fine.


All times are GMT -5. The time now is 12:54 PM.