LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-07-2006, 11:49 PM   #1
demoman
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Rep: Reputation: 0
Question Drive detected by kernel, but no /dev entry - what could be the cause?


My USB drive is detected by the kernel: dmesg identifies it as sdc. But...
there is no /dev/sdc entry being created and therefore cannot mount nor fdisk.

Same drive used to work both in this distro and 2 previous ones (Gentoo and SuSE).

I have tried all I could think of (see my initial post for the lengthy details) and read several FAQs on the topic. Abnormal symptoms:
  • absence of /dev/sdc entries
  • "Unknown line at line XXXX" returned by lsusb - (what causes this?)
  • occasional "Attribute {...} does not exist" in /var/log/messages - (what causes this?)

Any suggestion as to how to troubleshoot the problem?
Thanks in advance.

(Sorry for cross-posting this. Initially posted under Ubuntu but not yielding any result and troubleshooting path - if not solution - should be distro-independent).
 
Old 04-08-2006, 12:43 AM   #2
d0odman
Member
 
Registered: Sep 2004
Location: CA, USA
Distribution: Slackware 10.2
Posts: 132

Rep: Reputation: 15
What have you got creating your dev entries? You can manually make an sdc entry as root, and see if you're able to access your disk that way.

Code:
mknod /dev/sdc b 32 0
mknod /dev/sdc1 b 32 1
mknod /dev/sdc2 b 32 2
mknod /dev/sdc3 b 32 3
... etc
If you use udev, those should automagically appear each time you plug something in, otherwise, you'll have to find out what makes the devices for your system.
 
Old 04-08-2006, 01:55 AM   #3
demoman
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Lightbulb Some success

Thanks for the pointer to udev - making progress!

(mknod procedure didn't work - even after aligning permissions and major number with my SATA drive: mknod -m 660 /dev/sdc1 b 8 1).

But as you pointed out, udev is running the show:

Code:
root@xxxx:/tmp# ls -lR /etc/rc*.d/*udev*
lrwxrwxrwx  1 root root 14 2006-03-24 14:02 /etc/rcS.d/S04udev -> ../init.d/udev
lrwxrwxrwx  1 root root 19 2006-03-24 14:02 /etc/rcS.d/S36udev-mtab -> ../init.d/udev-mtab
I looked into udev-mtab and that lead me to /dev/.static.
While /dev/sdc* are not created, I can successfully mount against /dev/.static/dev/sdc2!
At least now I can access my data.

Code:
root@xxxx:/tmp# mount -t ext3 /dev/.static/dev/sdc2 /mnt/usblin/
root@xxxx:/tmp# ls /mnt/usblin
BACKUPS  lost+found  SYS-BACKUPS
But I'd still like to go to the bottom of this (because I'm also having a problem with my USB printer and suspect it's related).

Do the following errors tell you anything?

Code:
root@xxxx:/tmp# tail -f /var/log/syslog
Apr  7 23:42:34 localhost kernel: [4898405.922000]  /dev/scsi/host14/bus0/target0/lun0: p1 p2
Apr  7 23:42:34 localhost kernel: [4898405.972000] Attached scsi disk sdc at scsi14, channel 0, id 0, lun 0
Apr  7 23:42:34 localhost kernel: [4898405.993000] usb-storage: device scan complete
Apr  7 23:42:44 localhost scsi.agent[16564]: Attribute /sys/devices/pci0000:00/0000:00:10.0/usb1/1-2/1-2:1.0/host14/target14:0:0/14:0:0:0/type does not exist
Apr  7 23:45:52 localhost kernel: [4898603.553000] cm206 cdrom driver $Revision: 1.5 $ can't find adapter!
Apr  7 23:45:52 localhost modprobe: FATAL: Error inserting cm206 (/lib/modules/2.6.12-9-k7/kernel/drivers/cdrom/cm206.ko): Input/output error
Apr  7 23:46:04 localhost kernel: [4898616.448000] kjournald starting.  Commit interval 5 seconds
Apr  7 23:46:05 localhost kernel: [4898616.455000] EXT3 FS on sdc2, internal journal
Apr  7 23:46:05 localhost kernel: [4898616.455000] EXT3-fs: recovery complete.
Apr  7 23:46:05 localhost kernel: [4898616.455000] EXT3-fs: mounted filesystem with ordered data mode.
Thanks again.
 
Old 04-08-2006, 02:03 AM   #4
d0odman
Member
 
Registered: Sep 2004
Location: CA, USA
Distribution: Slackware 10.2
Posts: 132

Rep: Reputation: 15
Check out what the attributes are for the sdc entries in /dev/.static and I'm sure you'll find that the major number is 32, not 8 as you had it. That cm206.ko error would come up if you don't have that hardware on your system. If you don't, then that module is being loaded up somewhere you don't know about. That other error about the type thing is a new one for me, so I don't really have an explanation for it.
 
Old 04-08-2006, 02:11 PM   #5
demoman
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by d0odman
Check out what the attributes are for the sdc entries in /dev/.static and I'm sure you'll find that the major number is 32, not 8 as you had it.
Actually it seems to be 8 - but I have to admit I am not too sure what this means (failed to google any simple explanation of this).

Code:
# ls -l /dev/.static/dev/sdc*
brw-rw----  1 root disk 8, 32 2005-09-26 02:11 /dev/.static/dev/sdc
brw-rw----  1 root disk 8, 33 2005-09-26 02:11 /dev/.static/dev/sdc1
In any case, many thanks again for the directions as I now have a workaround!
 
Old 04-08-2006, 02:22 PM   #6
d0odman
Member
 
Registered: Sep 2004
Location: CA, USA
Distribution: Slackware 10.2
Posts: 132

Rep: Reputation: 15
A ha, yes, OK, I read the devices.txt file wrong. sdc is block major 8, while 32 references the whole disk. 33, 34, etc refer to the partitions, starting numbering from 1, with a limit of 15. If you're bored, you can check out that file included with the kernel source, in linux/Documentation. To add the devices in to /dev, mknod as above, but with "b 8 32", "b 8 33", etc, all the way to sdc15. If you use udev, those devices get automagically created, or they should be, or removed, depending on if they exist or not. Sorry for the blunder.
 
Old 04-13-2006, 05:03 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
In case you don't know these, they might help a little:

http://www.reactivated.net/writing_udev_rules.html
http://ftp.kernel.org/pub/linux/util...tplug/udev-FAQ
 
Old 04-14-2006, 12:08 AM   #8
demoman
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by JZL240I-U
That's great info. I didn't know much about udev. I'll play with this over the WE.
Thanks!
 
  


Reply



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
USB drive detected (dmesg) but no entry in /dev ?! demoman Ubuntu 8 05-11-2006 07:51 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM
kernel SATA drive detected but unusable. edx? jplev22 Linux - Hardware 1 07-26-2005 05:55 PM
USB external hard drive nolonger detected after kernel upgrade to 2.6.11-1.27_FC3 Capricorn180 Linux - Hardware 2 06-09-2005 04:27 AM
usb flash drive: no /dev entry zarg Slackware 3 09-21-2004 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration