You are not logged in.

#1 2004-03-30 03:18:51

nieczy
Member
Registered: 2004-03-27
Posts: 14

Symbolic link question.

When I get the answer to this I'll probably kick myself but here goes.  I have been trying to set up a symbolic link for my mouse using

ln -s /dev/psaux /dev/mouse

It creates the link at the time but the link disappears when I reboot the system. 

I know I can work around this but it seems like this should work.

Offline

#2 2004-03-30 12:29:02

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Symbolic link question.

That is because Arch uses devfs which is a virtual filesystem that's mounted at /dev. To make such link you should edit /etc/devfsd.conf in some way. Best to just use /dev/psaux (easier to remember that /dev/psaux is your mouse, than to remember how to make a /dev/mouse link with devfs).

Offline

#3 2004-03-30 15:16:34

nieczy
Member
Registered: 2004-03-27
Posts: 14

Re: Symbolic link question.

Thanks for the help. 

I had never heard of the devfs before so I probably wouldn't have gotten this on my own.  I had already changed my XF86config to look for /dev/psaux before I posted but I was trying to figure out why it wouldn't work.

I'm curious, do any other distros use devfs I've tried a few of the big distros and haven't come accross it yet?

I'm also curious about the advantages of referencing partitions as /dev/discs/disc0/part3 instead of /dev/hda3 as most other distros do.

Offline

#4 2004-03-31 10:59:30

mcubednyc
Member
From: New York, NY USA
Registered: 2004-03-17
Posts: 120

Re: Symbolic link question.

You might want to check out the Devfs FAQ, particularly the "Why Do It" section:
http://www.atnf.csiro.au/people/rgooch/ … devfs.html

I'm not aware of anything in the Arch docs that explain why Devfs was chosen over the more common /dev scheme, but I imagine that the reasons have to do with issues addressed in the Devfs FAQ.


"No live organism can continue for long to exist sanely under conditions of absolute reality; even larks and katydids are supposed, by some, to dream." - S. Jackson

Offline

#5 2004-03-31 12:35:34

nieczy
Member
Registered: 2004-03-27
Posts: 14

Re: Symbolic link question.

Thats a much better faq then the ones I read through.  I did find the advantages of it before but I didn't reallize that the /dev/disks... was related to devfs as well. 

I was really interested in seeing how common using devfs was as I have not run across it before.  Given the advantages listed I was wondering why the big distros don't seem to use it.

Offline

#6 2004-03-31 16:11:33

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Symbolic link question.

Slackware and Gentoo use it, and most likely other distros do too nowaday.

Devfs is obsoleted in Linux 2.6 though, udev is expected to replace it in the future (see http://www.kernel.org/pub/linux/utils/k … g/udev-FAQ for more info). I guess that Arch will switch to udev when they drop kernel 2.4 support, because devfs works with both 2.4 and 2.6, while udev works only with 2.6.

Personally I don't like devfs because of the daemon and it's naming scheme (/dev/hda1 or /dev/discs/disc0/part1, I prefer the shorter one). And if devfsd makes symlinks to the standard names you get a clutter in /dev. Udev seems great if you have all kind of usb stuff you plug in and out a lot, or change your hardware often, then a dynamic /dev is very useful, but my situation is very static, so I'd prefer a static /dev, with no devfs or udev.

Offline

#7 2004-03-31 16:38:21

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: Symbolic link question.

In analogy to xentacs advice

--- /etc/devfsd.conf ----
# Register palm device to /dev/pilot
REGISTER ^usb/tts/1$ CFUNCTION GLOBAL mksymlink $devname pilot
REGISTER ^usb/tts/.* PERMISSIONS root.usb 0660
REGISTER ^pilot$ PERMISSIONS root.usb 0660
UNREGISTER ^usb/tts/1$ CFUNCTION GLOBAL unlink pilot

it might work editing /etc/devfsd.conf. As usually there is only ONE psaux device, numbering it by using $1 is obsolete. Please check it, I may be wrong. Here is my tip:

# register /dev/psaux to /dev/mouse
REGISTER psaux CFUNCTION GLOBAL mksymlink $devname mouse
UNREGISTER psaux CFUNCTION GLOBAL unlink mouse

As I have no archlinux available right now, please have a look where the psaux device is located. Don't name me an idiot, it is used as /dev/psaux, so it should be placed there, where else. But if nothing works, check it. If it was inside a subfolder, f.e /dev/misc/psaux/, you should change the lines to REGISTER ^misc/psaux ... .
Btw, if you notice your devfs will not start up after changing this entry, remove it - or better find out what is wrong. In case of syntax errors, devfsd fails to start up.

Tell us if it worked or not, I am in a devfs fight, too.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#8 2004-03-31 16:52:53

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: Symbolic link question.

I think this is less than helpful. Does anyone know a better source for Devfs-Whisdom?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#9 2004-03-31 17:47:42

w0rm
Member
From: Vilnius, Lithuania
Registered: 2004-02-24
Posts: 12

Re: Symbolic link question.

try reading kernel's documentation then


knowledge is p0wer...

Offline

#10 2004-03-31 18:14:53

nieczy
Member
Registered: 2004-03-27
Posts: 14

Re: Symbolic link question.

Are you sure slackware uses this by default.  I have slackware 9.1 running on my main machine now and I access disks using the /dev/hda1 scheme and can make symlinks to hardware (I did if for my cdrom and dvd) without messing with a devfsd.conf file to do it.  I think slackware has it as a package so you can install it but I don't think it comes default.  Since I'm not a guru I pretty much went with the slack defaults figuring dealing with configuration from that point is a good start. 

I have to say I'm not that fond of the /dev/disks/disk0/part1 scheme either but I think its mainly because I'm used to the other.  Pacman is really nice though. 

i3839, (refering to you using static /dev) did you disable devfs in arch or do you use a different distro?

Offline

#11 2004-04-01 10:20:58

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Symbolic link question.

Hm, now you say so, I'm not sure if Slackware uses devfs by default. I just realized that I used my custom kernel with devfs enabled when trying out Slackware, so you're probably right.

I said that static /dev is best for me, I didn't say that I used it though. Currently I use what the distros use, and that's devfs.

This thread may be useful if you want to switch to a static /dev:  http://bbs.archlinux.org/viewtopic.php?t=2729
I didn't try it yet, but probably will when I'm more often behind my pc.

Offline

#12 2004-04-04 12:35:08

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: Symbolic link question.

w0rm wrote:

try reading kernel's documentation then

Quite funny. What a difference. You are a joker, aren't you... smile
No, I still don't like devfs. If I hadn't broken one arch config trying to follow "ihatedevfs", I already killed it.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

Board footer

Powered by FluxBB