# udev

## starnix

I was just wondering.  Does it pay to switch to udev from devfs yet?  Is it stable?  Can I switch to it easily?  Correct me if I'm wrong but doesn't the gentoo-dev-sources still require devfs?  Also,  what will be the advantage to switching to udev?  Sorry for all the questions I just cant find a whole lot of info answering the questions I have.  Thanks all...

----------

## John5788

gentoo-dev-sources does not require devfs. i installed gentoo on 3 boxes using gentoo-dev-sources and they all run udev and are fine.

you can easily switch to udev, just emerge udev and take off devfs support and ur done  :Smile: 

advantage of switching to udev is that it doesn't create a buncha unused nodes like devfs does

----------

## starnix

Will all my devices still be in the same place as they are with devfs?  For instance,  will my zipdrive still be /dev/sdb1 and my usbhd still be /dev/sda1? or will it move them.

----------

## John5788

im not sure about that, sry. u can always try udev and go back to devfs if u dont like it.

----------

## nekranos

 *starnix wrote:*   

> Will all my devices still be in the same place as they are with devfs?  For instance,  will my zipdrive still be /dev/sdb1 and my usbhd still be /dev/sda1? or will it move them.

 

I think that it depends on the order that they're detected/plugged into the system. For example, I have an external FireWire, I plug it in first, it gets named /dev/sda1. I then plug in another device, say, a USB memory stick, it gets detected as /dev/sdb1. And the other way around.

You can supposedly stop that from happening and bind your devices to a specific node like /dev/foo. Writing udev rules @ reactivated.net.

I personally use udev-030 (~x86), and it works fine. If you're going to switch from devfsd --> udev, just make sure that you disable a few things like devfsd in your kernel as per the unofficial instructions here.

----------

## starnix

Ok,  I tried installing udev (disabling devfs in the kernel) and when I booted,  my sound device wasnt there,  I had to remap XF86config to /dev/psaux instead of /dev/mouse,  I couldnt get my raid drive working (/dev/md0) and isnt udev supposed to only populate /dev with devices that are actually on your system?  /dev had TONS of stuff in it.  

What am I doing wrong.  I followed the gentoo udev guide.  Please help    :Sad: 

----------

## bennettp

the gentoo version of udev saves all your device nodes in a tarball, and copies all these into /dev at startup. You can disable this by changing the line RC_DEVICE_TARBALL (or something similar) in /etc/conf.d/rc to "no", but be warned: you will end up missing certain symlinks such as /dev/cdrom, etc (use /dev/cdroms/cdrom0 instead). Also, you'll need a newer version of the nvidia-kernel (5336 or newer), if applicable. There's really no reason to turn this off though, unless you really want /dev to only have the devices on your system.

The /dev/mouse device is actually a symlink to /dev/psaux. You could consider using /dev/input/mice instead; they're exactly the same, and /dev/psaux is only around for legacy applications.

Umm md0 could be a symlink as well? I'm not sure about this: I've never used a raid setup.

----------

## starnix

Do I need to put anything in fstab?  The Udev guide didnt say anything but Ive seen some posts that mention that you need to mount /sys or something like that.

----------

## bennettp

/sys will be mounted automatically.

what i meant by the fstab was i changed /dev/cdrom to /dev/cdroms/cdrom0, but you probably won't need to do this if you set RC_DEVICE_TARBALL to "no" in /etc/conf.d/rc

EDIT: fixed up my grammarLast edited by bennettp on Tue Jul 27, 2004 9:44 am; edited 2 times in total

----------

## gringo

I had "troubles" with md* devices and udev too but after "mknoding" them manually, the raid devices work without problems. And im not using the tarball.

----------

## starnix

Am I supposed to have sysfsutils installed?  It said in one post in the forums that emerging udev gives you sysfsutils but I did an emerge -p udev and it doesnt list it.  Could that be a problem?

here's the post.  Does it look to be correct and accurate?

https://forums.gentoo.org/viewtopic.php?t=115096&highlight=software+raid+udev

----------

## mattsk

 *bennettp wrote:*   

> Umm md0 could be a symlink as well? I'm not sure about this: I've never used a raid setup.

 

Not sure if it's a symlink or not, but under devfs (without devfsd) it's /dev/md/0 , /dev/md/1  etc.

----------

## g4c9z

I was also annoyed when I saw tons of devices in /dev.  I guess it's because all the devices haven't been ported to udev yet, right?  Does anyone know a website where I could check the status of udev, i.e. how many devices they have left to go?

----------

## Nate_S

well, in my /dev, most of the devices are on my system or are virtual devices that can be used for other things.  for example, I have 64 ttys, 8 loopback devices (which I only ever use two or three of at most), and 16 ramdisks (which I don't use at all, except for an initrd)  so, really there aren't that many things, just a lot of copys of some things.  try 'ls /dev | grep -v tty' and see how many things there are then.  

-Nate

----------

## g4c9z

 *Quote:*   

> try 'ls /dev | grep -v tty' and see how many things there are then. 

 

No fewer than 1164.  :Smile: 

Trust me, there's a device file there for tons and tons of devices that I don't have.  There's hda, hdb, up to hdh, and I only have 1 hard drive, plus 20 partitions for each.  It's because Gentoo adds them all when you use udev, and I guess it's because udev isn't complete - hence my previous questions.

----------

## alkan

about the udev status web site. 

udev vs devfs: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs

udev-FAQ:http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ

udev paper (It is better than reading how-to's): http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf

I thought it would be helpful.

----------

## g4c9z

Thanks, those are good sites, but I don't think they give the current status of udev, do they?  It seems like they don't get updated very often.

----------

## alkan

No, they haven't updated them for a while. Nevertheless, I could only got a good grasp of udev concept after reading those pages. 

There are also some links to email lists and web pages in there. It also mentions there are some 160 devices still to be supported by udev. That was back then. I guess udev supports most of the common devices now. 

A pure udev gentoo certainly works on my box now without a hinch, And I have variety of hardware, from TV card to usb storage and to firewire devices.

----------

## g4c9z

By the way, I think all those documents are part of the udev documentation that gets installed in /usr/share/doc.  In fact, I would think the TODO file would list how many devices they have left, but I didn't see it there.

----------

