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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-07-2003, 01:25 PM
|
#1
|
Senior Member
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207
Rep:
|
/dev entries
Im wondering how do i find out what /dev/ entry a device is assigned when connected if im not running devFS. For example i have usb 250 zip drive. If i keep it connected when i boot into linux, i can mount it via /dev/sda4, and i have IDE-SCSI emulation for my cdrom, and in the logs i can see it is assigned as /dev/sr0.
However the problem is when i connect the Zip drive while the computer is running. In the logs i see that linux recognized the device was conected, and that it was claimes by a driver (usb-storage) but i can not figure out what /dev entry to use to mount it. The same thing with my sony NW-E10 mp3 player that has flash memory. When i connect it, from the logs i see that linux recognizes a new device was conected, and sais that it is not claimed by any active driver, but does it still get a /dev entry? And how do i find out /dev entries. I looked at logs, and at /proc but i didnt find them (maybe i missed them??)
Is there a place where devices are assigned /dev entries where i can look them up?
Thanks
-NSKL
|
|
|
01-07-2003, 11:14 PM
|
#2
|
Senior Member
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590
Rep:
|
Have a poke around in the /proc directory, you can view the files with the 'cat' command, eg,
Code:
bern@aptiva:~$ cat /proc/bus/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 11/900 us ( 1%), #Int= 1, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB OHCI Root Hub
S: SerialNumber=d0a6d000
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=03f0 ProdID=0205 Rev= 0.00
S: Manufacturer=Hewlett-Packard
S: Product=HP ScanJet 3300C
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 48mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=10(unk. ) Sub=01 Prot=00 Driver=usbscanner
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 1 Ivl=8ms
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 11 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=03f0 ProdID=0304 Rev= 1.00
S: Manufacturer=Hewlett-Packard
S: Product=DeskJet 810C
S: SerialNumber=MY9CN150SYFY
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=01 Driver=usblp
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 0 Alt= 1 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
|
|
|
01-08-2003, 10:43 AM
|
#3
|
Senior Member
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207
Original Poster
Rep:
|
I did poke around in /proc even before posting the original question, but i can't find to what /dev entry a device is assigned. O poked everywhere where i thought i'll find something useful, but no go. Lookes at /proc/scsi/usb-storage tree and /prc/bus /prc/devices etc, but although it sais what devices are attached, it doesn't say where (where in /dev) i can find them. Do i need to run DevFS to find out device names? There has to be a file somewhere that sais:
zip drive -- /dev/sda2
cdrom -- /dev/hdc
etc... or else how can you mount a device if you can't figure what entry it has been given? For example i just tried to mount my Zip drive again, that used to work as /dev/sda4 under slack 8.0, but not anymore (and i know its recognized and claimed by a driver, it sais so in /prc/scsi/usb-storage/0 ) but i cant find what /dev entry to use to mount it. Tried sda1 through 9..
Any help, or is the only solution DevFS, in which case it's not good, because DevFS doesn't keep permissions over reboots, so i must make a script and invoke it at start-up to give appropriate permissions for /dev under DevFS...
Thanks for any tips on finding what /dev to use for a ZIP 250 (SCSI) drive, and a NW-E10 mp3 player, usb conected, internal flash memory..
Thanks
-NSKL
|
|
|
01-08-2003, 03:24 PM
|
#4
|
Senior Member
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590
Rep:
|
If you have hotplug then dmesg should tell you what device it is.
|
|
|
01-08-2003, 03:43 PM
|
#5
|
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
|
from this link:
http://www.linuxjournal.com/article.php?sid=6035
Quote:
This brings us to something that frustrates a lot of people when they first start using devfs. How do I get my permissions to come back after a reboot? This question has many answers: you can create a tarball of all the changed inodes prior to shutdown and then untar them during startup; you can store your permissions on a disk-based /dev and have devfsd copy and save them when starting up and shutting down; or you could simply add PERMISSIONS entries to your /etc/devfsd.conf file. Managing the device permissions for devfs in devfsd.conf via PERMISSIONS entries is great--you can have one entry for an entire group of devices. The following are some basic permissions I set up on my workstation:
REGISTER ^cdroms/.* PERMISSIONS root.cdrom 0660
REGISTER ^pty/s.* PERMISSIONS root.tty 0600
REGISTER ^sound/.* PERMISSIONS root.audio 0660
REGISTER ^tts/.* PERMISSIONS root.dip 0660
What those entries do is fairly simple. All the devices that are found under /dev/cdroms now have root as the owning user and cdrom as the owning group, with 0660 permissions, or u+rw g+rw o-rwx. I find this to be the easiest way to manage permissions. Using devfsd to manage permissions also prevents you from doing a quick chmod on a device when you first install it, telling yourself that you will set up the permissions correctly later and, of course, quickly forgetting that promise.
|
|
|
|
01-08-2003, 04:41 PM
|
#6
|
Senior Member
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207
Original Poster
Rep:
|
Ahh, although i read some DevFS docs, i must have skipped over this, because i remember reading that the easiest way is making a script. Anyway, this makes DevFS much more inviting. Thank you very much.
And just out of curiosity, of those who are reading this, who uses DevFS?
Thanks again
-NSKL
|
|
|
01-08-2003, 04:46 PM
|
#7
|
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
|
love it.
|
|
|
01-08-2003, 04:48 PM
|
#8
|
Senior Member
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590
Rep:
|
Hate it :-)
|
|
|
All times are GMT -5. The time now is 02:19 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|