You are not logged in.
Hi. I am still in war with devfsd, and find no real usefull cookbook. The communities turn away from devfsd, udev seems to be a risk, and I damaged 2 systems trying to switch to pure static dev, now.
In the strong believe, that several people around use more than one USB device, and software, that wants the device be named ttyUSB0 or /dev/pilot or what - I wonder how I could do that.
First surprise for me is, devfsd will only set /dev/usb/tty/0. I have three usb devices in usge, therefore it should be 0, 1, 2. But, to keep my system in my hands, I run selfmade kernels, with drivers compiled on, not as modules. Is devfs only registrating devices that be attached by modules?
Second, I wanted to set some links, and permissions. I tried several settings, last try is:
### devfsd.conf ###
# Register kobil device to /dev/ttyUSB0
REGISTER ^usb/tts/0$ CFUNCTION GLOBAL mksymlink $devname ttyUSB0
REGISTER ^usb/tts/.* PERMISSIONS root.users 0770
REGISTER ^ttyUSB0$ PERMISSIONS root.users 0770
UNREGISTER ^usb/tts/0$ CFUNCTION GLOBAL unlink ttyUSB0
# Register palm device to /dev/pilot
REGISTER ^usb/tts/1$ CFUNCTION GLOBAL mksymlink $devname pilot
REGISTER ^usb/tts/.* PERMISSIONS root.pilot 0660
REGISTER ^pilot$ PERMISSIONS root.pilot 0660
UNREGISTER ^usb/tts/1$ CFUNCTION GLOBAL unlink pilot
# Register camera device to /dev/camera
REGISTER ^usb/tts/2$ CFUNCTION GLOBAL mksymlink $devname camera
REGISTER ^usb/tts/.* PERMISSIONS root.camera 0660
REGISTER ^camera$ PERMISSIONS root.camera 0660
UNREGISTER ^usb/tts/1$ CFUNCTION GLOBAL unlink camera
In the end, you see, I try to make devfsd behave like static dev. I have no idea how it works.
If one could be so kind to give me a hint, a solution, a real readme for devfsd. I am so tired about devfsd ... :cry:
PS:
If arch 07 installer could leave the option so the user can choice between devfs and static? Wasn't it a main target that arch should give the users the power? So why has devfsd ... ?
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
Whats wrong with using Hotplug?
Mr Green
Offline
And what exactly do you mean?
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
So no one really knows?
:shock:
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
That's why devfs is done when udev is stable. It's confusing, annoying, and in my experience, not nearly as efficient as many seem to think it is, but they probably actually know how to use it. devfs and udev are both lacking in docs.
If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
- John Cage
Offline
That's why devfs is done when udev is stable. It's confusing, annoying, and in my experience, not nearly as efficient as many seem to think it is, but they probably actually know how to use it. devfs and udev are both lacking in docs.
This is what I think, too. I found no usable aid for hotplug, devfs, udev. Documentation ... I found none, but several words about the benefits of udev against devfs, or how to set up ONE piece of hardware with hotplug. If you find someone, who tells you in BIG WORDS why you don't use hotplug OR udevfs OR devfs and you respond HOW this could be done or WHERE you could get further information from you will recieve no reply. Everyone seems to tell you you should use the technique you aren't using right now, so if you run devfs, you'll be told to use udev, because it is better. If on udev, you are told to use static / devfs, because udev was still in developpment, and yet not ready. I switched to static, using ihatedevfs.sh, and run into problems as the script is limited to a small number of nodes, f.e. it stopped after creating /dev/sdd, and didn't created /dev/sde, but this is my root partition. Several nodes where not created, and my config was messed up after this tial. Well. Fortunately, you can switch back to devfs, if you had a backup or know which files to touch, and so I was back on the merry-go-round.
No one seems to know nothing, but everyone seems to have a kind of an idea, heared a rumour, knows a friend who has a cousin who ...
Unfortunately, archlinux uses devfs. For my workstation, this is an opt-out. Without proper usage of multiple usb devices, I can't use it. I have to use different hardware, like palm, camera, card readers, handy, sticks, scanner, etc. So, I just wiped my discs and run windows now (on the workstation) untill I found out (on my laptop) how I could do the jobs using arch.
This is somehow dissapointing.
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
Don't dispair Pink,
If I can get udev and hotplug working any one can.
After much comptemplation I finally took the UDEV plunge and found it working
pretty swell so far.
First I started with this link and followed it closely:
http://bbs.archlinux.org/viewtopic.php?t=2955
I found that arch's hotplug package is out of date so don't use it.
I downloaded 2 packages from the kernel hotplug site:
http://www.kernel.org/pub/linux/utils/kernel/hotplug/
I used:
hotplug-2004_04_01.tar.gz
udev-024.tar.gz
And downloaded from
http://linux-diag.sourceforge.net/Sysfsutils.html
sysfsutils-1.1.0.tar.gz
Must change install prefix to /usr so to install in /usr/bin instead of the default /usr/bin/local.
The 2 most impressive sites I found to actually help me setup my stuff are:
http://webpages.charter.net/decibelshel … rimer.html
http://www.reactivated.net/udevrules.php
(UDEVPrimer is targeted towards gentoo people but really helped me understand stuff)
You really need to pay attention to permissions setup in /etc/udev/udev.permissions and /etc/group files.
If not setup correctly you will have problems with X terminals like kde's konsole that I use.
Also the ttys an vc stuff is most important.
Pay special attention to the first post on setting up tty's and vc's
I most enjoy fiddling with the udev.rules file so to setup nodes to my own names.
COOOL!
I named my Canon S400 node /dev/canon_s400.
My Olympus D100 node /dev/camera.
This camera was most troublesome trying to connect back
in kernels around 2.4.18 through 2.4.20. I always had to hack the transport.c
and transport.h in usb-storage so to work. This must be fixed in the later 2.4 and
now 2.6 kernels as I don't have to hack anymore.
My PNY Attache` 128M node is /dev/usb_stick.
All get found and setup as I plug and unplug the devices just as advertised
Hotplug must be started in rc.conf file.
When you make install hotplug it puts the startup script in /etc/init.d.
You have to move it to rc.d
It slows down the boot process as it initalizes but it seems to work.
I don't know how hotplug works quite yet but I will keep studying.
Some device nodes that I find useful like fd0u1680 are missing but reading the links
these may be forthcoming. In the mean time I can hack those in using the rc.local file.
BYE! BYE! devfs.
HELLO! udev.
fstab and lilo.conf files need to be changed back to the old static /dev names like hda, hdb, etc.
There is quite abit of stuff that needs to be thought through before taking the plunge.
If you have any questions on stuff I may have missed just give me a ring. I may be able to assist.
Happy UDEVing
slyski
Joey: If a cow passes away from natural causes can I eat it.
Pheobe: Not if I get there first.
Offline
Very useful. Thank you very much!
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
No problem,
Another thing I forgot to mention was that hotplug needs to place a file in
/var/lock/subsys
I did not have that directory so I had to make it.
There may be other things also and I'll keep you posted
EDIT
Another thing that I just noticed:
I loaded the usb-storage module as usual using rc.conf
When I plug in my camera/usb stick and it uses that module and it sets up sda1 in /dev.
When I unplug my device it unloads the module and sda1 disappears.
That tells me that it is working correctly.
ANOTHER EDIT
Arch has recently update hotplug but i haven't gotten around installing it yet. maybe this weekend i'll give it a try.
Enjoy,
slyski
Joey: If a cow passes away from natural causes can I eat it.
Pheobe: Not if I get there first.
Offline