LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-06-2006, 04:27 AM   #1
TroelsSmit
Member
 
Registered: Feb 2004
Location: Denmark
Distribution: Debian / Suse
Posts: 223

Rep: Reputation: 30
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?
 
Old 02-06-2006, 05:03 AM   #2
BinJajer
Member
 
Registered: Sep 2005
Location: Warsaw, Poland
Distribution: Slackware 10.2, Caldera OpenLinux 3.1, Corel Linux (Thanks xhi!), Debian GNU/HURD etc...
Posts: 296
Blog Entries: 1

Rep: Reputation: 30
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.
 
Old 02-06-2006, 05:05 AM   #3
vangelis
Member
 
Registered: Nov 2004
Location: Hellas
Distribution: Zenwalk 6.4
Posts: 337
Blog Entries: 4

Rep: Reputation: 30
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
 
Old 02-06-2006, 05:11 AM   #4
esje
Member
 
Registered: Mar 2004
Location: Holland
Distribution: Debian Etch, Gentoo 2005.1/SUSE 10
Posts: 52

Rep: Reputation: 15
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.
 
Old 02-06-2006, 06:03 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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.

Last edited by jschiwal; 02-06-2006 at 06:07 AM.
 
Old 02-06-2006, 06:43 AM   #6
TroelsSmit
Member
 
Registered: Feb 2004
Location: Denmark
Distribution: Debian / Suse
Posts: 223

Original Poster
Rep: Reputation: 30
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
 
Old 02-06-2006, 06:44 AM   #7
TroelsSmit
Member
 
Registered: Feb 2004
Location: Denmark
Distribution: Debian / Suse
Posts: 223

Original Poster
Rep: Reputation: 30
Suse 10.0 btw
 
Old 02-06-2006, 06:48 AM   #8
esje
Member
 
Registered: Mar 2004
Location: Holland
Distribution: Debian Etch, Gentoo 2005.1/SUSE 10
Posts: 52

Rep: Reputation: 15
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.

Last edited by esje; 02-06-2006 at 06:56 AM.
 
Old 02-06-2006, 07:05 AM   #9
esje
Member
 
Registered: Mar 2004
Location: Holland
Distribution: Debian Etch, Gentoo 2005.1/SUSE 10
Posts: 52

Rep: Reputation: 15
Sorry, I just checked in SUSE 10 and the group you are looking for is probably "disk".
 
Old 02-06-2006, 07:23 AM   #10
TroelsSmit
Member
 
Registered: Feb 2004
Location: Denmark
Distribution: Debian / Suse
Posts: 223

Original Poster
Rep: Reputation: 30
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
 
Old 02-06-2006, 07:43 AM   #11
esje
Member
 
Registered: Mar 2004
Location: Holland
Distribution: Debian Etch, Gentoo 2005.1/SUSE 10
Posts: 52

Rep: Reputation: 15
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 ?
 
Old 02-06-2006, 07:46 AM   #12
TroelsSmit
Member
 
Registered: Feb 2004
Location: Denmark
Distribution: Debian / Suse
Posts: 223

Original Poster
Rep: Reputation: 30
Code:
$ lsscsi
[3:0:0:0]    disk    USB2.0   CardReader CF RW 0.0>  -

it seems that it is not combined with a device?
 
Old 02-06-2006, 09:29 AM   #13
esje
Member
 
Registered: Mar 2004
Location: Holland
Distribution: Debian Etch, Gentoo 2005.1/SUSE 10
Posts: 52

Rep: Reputation: 15
Did you look into the link/your modules/lsmod?
 
Old 02-06-2006, 09:45 PM   #14
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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.

Last edited by jschiwal; 02-08-2006 at 05:34 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maxtor Usb harddrive. Buffer I/O error on device sda. sfumato Linux - Hardware 3 12-26-2005 11:38 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 07:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 02:15 AM
Microadvantage USB Flash drive not creating sda scuzzman Linux - Hardware 8 04-11-2005 04:31 AM
mount USB devices, sda, manually/statically assign sda? Oxyacetylene Debian 3 12-20-2004 02:45 PM


All times are GMT -5. The time now is 05:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration