# Conversion to udev

## Horus107

Hello,

AFAIK Gentoo uses udev as default system now. Since I've a old installation with devfs I would like to convert my system to udev. Is there a HOWTO arround for doing that?

Thanks,

Florian

----------

## dsd

details in here : http://www.gentoo.org/doc/en/migration-to-2.6.xml

----------

## Horus107

Ok, I've followed the steps in the udev guide. But it somehow seems to me that I'm rather using the old static /dev not. For example I've hda devices up to hda20 although my partition are only ranging up to hda4. Although I didn't find the usb devices that were at /dev/usb.

Is there any way to check if it's really udev?

Thanks,

Florian

----------

## widan

You can look for those:

```
stephanie ~ # ls -l /dev/.udev

-rw-r--r--  1 root root 0 Jun 10 12:03 /dev/.udev

stephanie ~ # mount | grep "on /dev"

none on /dev type tmpfs (rw)

none on /dev/pts type devpts (rw)

none on /dev/shm type tmpfs (rw)
```

If you don't have anything mounted on /dev, you're seeing the static nodes. With udev you should not have hda20 for example if you do not have such a partition.

----------

## dsd

you probably want to turn off the udev tarball

----------

## karr

Here is another document specific to udev thats good if your already on 2.6. It covers disabling the device tarball:

http://www.gentoo.org/doc/en/udev-guide.xml

----------

## Horus107

Setting

 *Quote:*   

> 
> 
> RC_DEVICE_TARBALL="no"
> 
> 

 

Made it. So nodes like hda20 disappeared.

Thx & Bye,

Florian

----------

## andrewd18

Always better to post in an existing thread than start a new one, eh?

I've got a Hardened Gentoo 2004.0 system with 2.6.11-hardened-r15 running as my webserver, and it complains every time it boots. It works fine, but it yells at me.

```
HP ~ # mount | grep "on /dev/"

devpts on /dev/pts type devpts (rw,gid=5,mode620)

none on /dev/shm type tmpfs (rw)
```

I know UDEV doesn't work well with hardened right now. How would I go about upgrading to devfs?

~~ Andrew D.

*edit* Code typos

----------

## dgaffuri

 *andrewd18 wrote:*   

> 
> 
> ```
> HP ~ # mount | grep "on /dev/"
> 
> ...

 

Where is the problem? May you post the error messages?

 *andrewd18 wrote:*   

> I know UDEV doesn't work well with hardened right now. How would I go about upgrading to devfs?

 

AFAIK devfs support will be removed in 2.6.13.

----------

## andrewd18

 *Quote:*   

> The Gentoo Linux initialization scripts have detected that your system does not suppport DEVFS or UDEV. Since Gentoo Linux has been designed with these dynamic /dev managers in mind, it is highly supggested that you build support for it into your kernel. http//wwww.gentoo.orgt/doc/en/handbook

 

That's the "error". While the system works just fine, I'd rather not be two generations back on my /dev...

~~ Andrew D.

----------

## dgaffuri

I would upgrade to udev, as I said devfs support will be almost surely removed in 2.6.13. You may take a look at

http://www.gentoo.org/doc/en/udev-guide.xml

----------

## andrewd18

Well, sure, but I'm running Hardened Gentoo, not regular, and UDEV I know for sure doesn't work. Talked to some of the guys on #gentoo-hardened.

~~ Andrew D.

----------

## dsd

udev works just fine on hardened-sources-2.6 - however you are correct in saying it wont work on hardened-sources-2.4, which is still the hardened default i believe..?

----------

## andrewd18

 *Quote:*   

> udev works just fine on hardened-sources-2.6 - however you are correct in saying it wont work on hardened-sources-2.4, which is still the hardened default i believe..?

 

Well, I've got kernel 2.6.11-hardened-r15.... so you're saying it should work....

Oh, I remember now what the issue was. UDEV isn't SELinux compatible yet! That's why I didn't choose UDEV when installing it. But I've got SELinux in permissive mode right now until I figure out all my avc errors so... maybe by the time I get around to switching to enforced UDEV'll be ready...

Is it worth a shot?

~~ Andrew D.

----------

## dsd

yes, as pretty soon you wont have any other choice

----------

## andrewd18

UDEV is now marked as stable on hardened Gentoo. I'll be updating sometime in the next few weeks, and I'll post here if I see anything horribly awful.  :Smile: 

~~ Andrew D.

----------

