LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   USB flash device (sda missing) (https://www.linuxquestions.org/questions/linux-newbie-8/usb-flash-device-sda-missing-412150/)

TroelsSmit 02-06-2006 04:27 AM

USB flash device (sda missing)
 
Hey,

My usb device is no longer correctly mounted.

Dmesg is saying the following:

Code:

usb 5-1: USB disconnect, address 7
usb 5-1: new high speed USB device using ehci_hcd and address 8
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 8
usb-storage: waiting for device to settle before scanning
  Vendor: USB2.0    Model: CardReader CF RW  Rev: 0.0>
  Type:  Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 125440 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: Mode Sense: 02 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 125440 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: Mode Sense: 02 00 00 00
sda: assuming drive cache: write through
 sda: sda1
Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi2, channel 0, id 0, lun 0,  type 0
usb-storage: device scan complete

When I then do a:

Code:

$ ls /dev/sda*
/bin/ls: /dev/sda*: No such file or directory

no sda device exist ????

how do I fix this?

BinJajer 02-06-2006 05:03 AM

If no such device exists, tru uba or something that makes sence. If you don't find anythig, cd to /dev and ./MAKEDEV sda1 or so.

vangelis 02-06-2006 05:05 AM

have you plugged a usb device and it doesn't show you anything?
the usb devices like /dev/sda1 are created by hotplugging.

Plug something in and then run as root lsusb and see if it's recognized

esje 02-06-2006 05:11 AM

What my dmesg is telling me when I plug in a USB stick is the following:

"Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0"

Your dmesg is telling you this:

"Attached scsi generic sg0 at scsi2, channel 0, id 0, lun 0, type 0"

I guess trying /dev/sg0 (or something of that sort) may be the answer.

jschiwal 02-06-2006 06:03 AM

The information from /var/log/messages may be more complete, such as:
Feb 5 22:51:33 delllap kernel: usb-storage: device scan complete
Feb 5 22:51:33 delllap kernel: SCSI device sda: 320173056 512-byte hdwr sectors (163929 MB)
Feb 5 22:51:33 delllap kernel: sda: assuming drive cache: write through
Feb 5 22:51:33 delllap kernel: SCSI device sda: 320173056 512-byte hdwr sectors (163929 MB)
Feb 5 22:51:33 delllap kernel: sda: assuming drive cache: write through
Feb 5 22:51:33 delllap kernel: sda: sda1
Feb 5 22:51:33 delllap kernel: Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
Feb 5 22:51:36 delllap hal-subfs-mount[1600]: SYMLINKS:: disk/by-id/usb-Maxtor_6_Y160L0_0F1007381A08 disk/by-path/usb-0F1007381A08:0:0:0
Feb 5 22:51:36 delllap hal-subfs-mount[1600]: MOUNT_POINT:: /media/usbdisk
Feb 5 22:51:36 delllap hal-subfs-mount[1600]: MOUNTPOINT:: /media/usbdisk
Feb 5 22:51:36 delllap hal-subfs-mount[1600]: Collected mount options and Called(0) /bin/mount -t subfs -o fs=floppyfss,sync,procuid,nosuid,nodev,exec,utf8=true /dev/sda1 "/media/usbdisk"

Also, check the output of lsmod. I was having the same problem on my desktop, but when I tried "modprobe ehcd-hcd" my usb drive appeared on the desktop. I believe that the uhci or ohci module is used for USB 1.1 while the ehci module is used for USB 2.0 devices. (See /usr/src/linux-<kernel-version>/Documentation/usb/ for documentation on kernel usb devices if you have the kernel-docs package installed.)

One last thing to check. I had a usb key drive that wouldn't show up. Manually mounting it, it showed up as empty. Somehow the partition type was changed to hidden fat32. Changing the partition type fixed the problem and my files were back.

TroelsSmit 02-06-2006 06:43 AM

More info according to your posts:

Code:

$ sudo modprobe ehcd-hcd
FATAL: Module ehcd_hcd not found

$ sudo mount /dev/sg0 /mount/flash
mount: special device /dev/sg0 does not exist

$ sudo lsusb
sudo: lsusb: command not found

$ sudo tail -n 24  /var/log/messages
Feb  6 13:46:12 linfvdrdev2 kernel: usb 5-1: new high speed USB device using ehci_hcd and address 9
Feb  6 13:46:12 linfvdrdev2 kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Feb  6 13:46:12 linfvdrdev2 kernel: usb-storage: device found at 9
Feb  6 13:46:12 linfvdrdev2 kernel: usb-storage: waiting for device to settle before scanning
Feb  6 13:46:17 linfvdrdev2 kernel:  Vendor: USB2.0    Model: CardReader CF RW  Rev: 0.0>
Feb  6 13:46:17 linfvdrdev2 kernel:  Type:  Direct-Access                      ANSI SCSI revision: 00
Feb  6 13:46:17 linfvdrdev2 kernel: SCSI device sda: 125440 512-byte hdwr sectors (64 MB)
Feb  6 13:46:17 linfvdrdev2 kernel: sda: Write Protect is off
Feb  6 13:46:17 linfvdrdev2 kernel: sda: Mode Sense: 02 00 00 00
Feb  6 13:46:17 linfvdrdev2 kernel: sda: assuming drive cache: write through
Feb  6 13:46:17 linfvdrdev2 kernel: SCSI device sda: 125440 512-byte hdwr sectors (64 MB)
Feb  6 13:46:17 linfvdrdev2 kernel: sda: Write Protect is off
Feb  6 13:46:17 linfvdrdev2 kernel: sda: Mode Sense: 02 00 00 00
Feb  6 13:46:17 linfvdrdev2 kernel: sda: assuming drive cache: write through
Feb  6 13:46:17 linfvdrdev2 kernel:  sda: sda1
Feb  6 13:46:17 linfvdrdev2 kernel: Attached scsi removable disk sda at scsi3, channel 0, id 0, lun 0
Feb  6 13:46:17 linfvdrdev2 kernel: Attached scsi generic sg0 at scsi3, channel 0, id 0, lun 0,  type 0
Feb  6 13:46:17 linfvdrdev2 kernel: usb-storage: device scan complete


TroelsSmit 02-06-2006 06:44 AM

Suse 10.0 btw

esje 02-06-2006 06:48 AM

Maybe a silly question, but have you tried reaching the stick as root?

edit: If you have HAL/hotplug/whatever, which you probably are, you may want to try "ls -lR /dev/|grep "hal"" (or grep for the time you are plugging it in). In debian, the device is created by root from group "hal" and at the time you're plugging it in.

esje 02-06-2006 07:05 AM

Sorry, I just checked in SUSE 10 and the group you are looking for is probably "disk".

TroelsSmit 02-06-2006 07:23 AM

Code:

$ ls -lR /dev/| grep "disk"
drwxr-xr-x  5 root root      100 2006-01-23 10:04 disk
brw-r-----  1 root disk    3,  0 2006-01-23 10:04 hda
brw-r-----  1 root disk    3,  1 2006-01-23 10:04 hda1
brw-r-----  1 root disk    3,  2 2006-01-23 10:04 hda2
brw-rw----+ 1 ts  disk    3,  64 2006-01-23 10:04 hdb
brw-r-----  1 root disk    7,  0 2006-01-23 10:04 loop0
brw-r-----  1 root disk    7,  1 2006-01-23 10:04 loop1
brw-r-----  1 root disk    7,  2 2006-01-23 10:04 loop2
brw-r-----  1 root disk    7,  3 2006-01-23 10:04 loop3
brw-r-----  1 root disk    7,  4 2006-01-23 10:04 loop4
brw-r-----  1 root disk    7,  5 2006-01-23 10:04 loop5
brw-r-----  1 root disk    7,  6 2006-01-23 10:04 loop6
brw-r-----  1 root disk    7,  7 2006-01-23 10:04 loop7
brw-r-----  1 root disk    1,  0 2006-01-23 10:04 ram0
brw-r-----  1 root disk    1,  1 2006-01-23 10:04 ram1
brw-r-----  1 root disk    1,  10 2006-01-23 10:04 ram10
brw-r-----  1 root disk    1,  11 2006-01-23 10:04 ram11
brw-r-----  1 root disk    1,  12 2006-01-23 10:04 ram12
brw-r-----  1 root disk    1,  13 2006-01-23 10:04 ram13
brw-r-----  1 root disk    1,  14 2006-01-23 10:04 ram14
brw-r-----  1 root disk    1,  15 2006-01-23 10:04 ram15
brw-r-----  1 root disk    1,  2 2006-01-23 10:04 ram2
brw-r-----  1 root disk    1,  3 2006-01-23 10:04 ram3
brw-r-----  1 root disk    1,  4 2006-01-23 10:04 ram4
brw-r-----  1 root disk    1,  5 2006-01-23 10:04 ram5
brw-r-----  1 root disk    1,  6 2006-01-23 10:04 ram6
brw-r-----  1 root disk    1,  7 2006-01-23 10:04 ram7
brw-r-----  1 root disk    1,  8 2006-01-23 10:04 ram8
brw-r-----  1 root disk    1,  9 2006-01-23 10:04 ram9
/dev/disk:
/dev/disk/by-id:
/dev/disk/by-path:
/dev/disk/by-uuid:
ts@linfvdrdev2: ( ~ ) $ sudo mount /dev/hda1 /mount/flash/
Password:
/dev/hda1 looks like swapspace - not mounted


esje 02-06-2006 07:43 AM

How about checking lsmod output? lsscsi? Plugging in the device and running updatedb and locate sda? (Because the fun thing is, according to dmesg, it's putting it somewhere in sda.)

Did you read this: http://www.4p8.com/eric.brasseur/suse9.1_usb_stick.html ?

TroelsSmit 02-06-2006 07:46 AM

Code:

$ lsscsi
[3:0:0:0]    disk    USB2.0  CardReader CF RW 0.0>  -


it seems that it is not combined with a device?

esje 02-06-2006 09:29 AM

Did you look into the link/your modules/lsmod?

jschiwal 02-06-2006 09:45 PM

If you are using SuSE, a USB disk will be mounted under /media. It may be mounted as /media/usbdisk or if the partition has a label, that name may be used instead. Or the Manufacturer's name may be used as in /media/SansDisk/. The sg device is a low level scsi device that other devices use. You wouldn't mount that device. You may need to start the hal service. I'm thinking this may be the case because it isn't producing any logs in /var/log/messages. Try "sudo /usr/sbin/rchal --status" If on your computer, the USB port is USB 1.1, then the ehci-hcd module won't be used. Also, make sure that this line exists in your /etc/fstab file: usbfs /proc/bus/usb usbfs noauto 0 0 One last thing to check. Are you talking about a USB drive, or USB keydrive that plugs into the USB port. If you have an SD Flash Memory device, that is a different animal. I don't know if it would be supported, because the devices are proprietory. On my other laptop, I got a SD to USB adapter that can be used to enable mounting a SD disk like a normal key drive. This adapter came with the laptop.


All times are GMT -5. The time now is 10:05 PM.