# udev and devfs confusion

## fdamstra

I've tried searching the forums, but it's just resulted in more confusion for me.  I'm upgrading a server from 2.4.x to 2.6.x, and following the 2.6 Migration Guide, and using genkernel.

The migration guide tell me to run genkernel with the --udev flag.  The Gentoo installation handbook tells me that even for 2.6 kernels, I need the kernel options for /dev file system support and Automatically mount at boot.

Do I need both?  What does the --udev flag in genkernel do?  The threads I've found on the topic seem to be geared towards getting rid of devfs dependence, but it's unclear if this is a stable configuration yet.  The manual configuration in the migration clearly states that I should disable devfs support, but does that still apply for genkernel with it's busybox and initrd?

Help and clarification would be appreciated.

----------

## r00tzz

From what I know, at least I use it this way, you don't need to compile /devfs support on kernel. just leave it alone and emerge udev, works for me!

----------

## xsteadfastx

and i still get this here on boot:

```
devfs_mk_dev: could not append to parent for vcc/2

devfs_mk_dev: could not append to parent for vcc/a2

devfs_mk_dev: could not append to parent for vcc/4

devfs_mk_dev: could not append to parent for vcc/a4

devfs_mk_dev: could not append to parent for vcc/10

devfs_mk_dev: could not append to parent for vcc/a10

devfs_mk_dev: could not append to parent for vcc/2

devfs_mk_dev: could not append to parent for vcc/a2

devfs_mk_dev: could not append to parent for vcc/3

devfs_mk_dev: could not append to parent for vcc/a3

devfs_mk_dev: could not append to parent for vcc/5

devfs_mk_dev: could not append to parent for vcc/a5

devfs_mk_dev: could not append to parent for vcc/6

devfs_mk_dev: could not append to parent for vcc/a6

devfs_mk_dev: could not append to parent for vcc/4

devfs_mk_dev: could not append to parent for vcc/a4

```

i just did it like the migration guide said....with genkerenl --udev

but i just looked and devfs is still there installed

----------

## dsd

i have never used genkernel and don't know how it works..what is written in the migration guide is absed on what the author told me.

i guess --udev enables udev (rather than devfsd) in the initrd. maybe you have to remove devfs from your kernel config manually.. i have asked him about this, no response yet.

----------

## xsteadfastx

 *dsd wrote:*   

> i have never used genkernel and don't know how it works..what is written in the migration guide is absed on what the author told me.
> 
> i guess --udev enables udev (rather than devfsd) in the initrd. maybe you have to remove devfs from your kernel config manually.. i have asked him about this, no response yet.

 

thanks alot. i just greped in the config and it says: 

```
CONFIG_DEVFS_FS=y

# CONFIG_DEVFS_MOUNT is not set

# CONFIG_DEVFS_DEBUG is not set
```

do you know where the devfs und udev options are in the menuconfig?

----------

## robet

Those are the devFS options, there are no udev options in the kernel

----------

## xsteadfastx

 *robet wrote:*   

> Those are the devFS options, there are no udev options in the kernel

 

and where i can find it in the kernel configuration?

----------

## fdamstra

Just an update.

Leaving DevFS support in the kernel still magically mounted it after a boot; I'm not sure why.

Taking out DevFS support completely from the kernel and adding "gentoo=nodevfs udev" to my kernel line in grub appears to be working fine and using udev.  At least I believe so.  'mount' shows /dev is type ramfs, and I have an entire tree under /sys.  While there's no mention of udev in dmesg or messages, there are no errors, either.

FWIW, this is using the hardened dev sources and genkernel.

Thanks for the input.

----------

## xsteadfastx

i think maybe it was big failure to try to migrate to 2.6 

so now i put everything out the kernel configuration what has to do with devfs and it doesnt boot no more....just tell he wants devfs....so can me somebody tell me where in the kernel i can make the devfs and udev settings i need? i think that should be in the migration guide

----------

## xsteadfastx

while booting i get this now...please i need really help

```
mount: Mounting devfs on /dev failed: No such device

Error opening file: ".devfsd" No such file or directory

Block device /dev/hda3 is not a valid root device
```

i used genkernel and disabled devfs but why he wants devfs....not even when i try gentoo=nodevfs...the same stuff....i really need some help cause its like my backup server at home for my parents...please

----------

## dsd

did you emerge udev?

----------

## xsteadfastx

 *dsd wrote:*   

> did you emerge udev?

 

yes i did....i even boot with "gentoo=nodevfs" and its booting good. but i still have the vcc failures. 

sys-fs/udev 045 is installed....

----------

## xsteadfastx

or should i maybe remerge hotplug? could that be?

but i think its maybe a problem of genkernel...

Edit: or could it be a initrd problem?

----------

## mrv

Hi,

I also just emerged udev into my system. Booting seems to go just fine. However, I recall that I read from some other thread earlier that I need to edit some init script to not extract dev-tarball into the /dev. Is that still valid step? What script do I need to edit?

 -mrv-

----------

## xsteadfastx

 *mrv wrote:*   

> Hi,
> 
> I also just emerged udev into my system. Booting seems to go just fine. However, I recall that I read from some other thread earlier that I need to edit some init script to not extract dev-tarball into the /dev. Is that still valid step? What script do I need to edit?
> 
>  -mrv-

 

which kernel do you use? you didnt changed something in the kernel configuration?

----------

## mrv

I'm using gentoo-dev-sources, currently 2.6.9-gentoo-r6. I disabled devfs support in the kernel.

 -mrv-

----------

## LordBug

Not sure if it would matter, but you might want to check /etc/conf.d/rc.  There's a line in there (I don't remember which) that can toggle DevFS/UDev.  It might be tripping you up.  This file also sets whether or not the Dev tarball is kept or not.  I'd personally suggest setting this to "NO" for UDev.

----------

## xsteadfastx

 *mrv wrote:*   

> I'm using gentoo-dev-sources, currently 2.6.9-gentoo-r6. I disabled devfs support in the kernel.
> 
>  -mrv-

 

you used genkernel? do you use a initrd?

----------

## mrv

 *xsteadfastx wrote:*   

>  *mrv wrote:*   I'm using gentoo-dev-sources, currently 2.6.9-gentoo-r6. I disabled devfs support in the kernel.
> 
>  -mrv- 
> 
> you used genkernel? do you use a initrd?

 

No, I configured the kernel manually and no, I don't use initrd.

 -mrv-

----------

## mrv

 *LordBug wrote:*   

> Not sure if it would matter, but you might want to check /etc/conf.d/rc.  There's a line in there (I don't remember which) that can toggle DevFS/UDev.  It might be tripping you up.  This file also sets whether or not the Dev tarball is kept or not.  I'd personally suggest setting this to "NO" for UDev.

 

Thanks, this was the one I was looking for  :Smile: 

 -mrv-

----------

## xsteadfastx

 *LordBug wrote:*   

> Not sure if it would matter, but you might want to check /etc/conf.d/rc.  There's a line in there (I don't remember which) that can toggle DevFS/UDev.  It might be tripping you up.  This file also sets whether or not the Dev tarball is kept or not.  I'd personally suggest setting this to "NO" for UDev.

 

i already did that and nothing worked  :Sad: 

----------

## mrv

 *xsteadfastx wrote:*   

>  *LordBug wrote:*   Not sure if it would matter, but you might want to check /etc/conf.d/rc.  There's a line in there (I don't remember which) that can toggle DevFS/UDev.  It might be tripping you up.  This file also sets whether or not the Dev tarball is kept or not.  I'd personally suggest setting this to "NO" for UDev. 
> 
> i already did that and nothing worked 

 

These were the steps that I did (hopefully I didn't forget anything):

- emerge udev

- disable devfs from the kernel -> recompile and install it

- add "gentoo=nodevfs" and "udev" into kernel parameters

- boot

- disable dev tarball stuff in /etc/conf.d/rc

- boot once more to see that everything works

Works like a charm on my machine.

 -mrv-

----------

## Udasai

When switching from devfs to udev, I had to create two devices in /dev manually (in the actual file system), /dev/console and /dev/null.  These are major/minor (5,1) and (1,3) respectively using mknod.  My underlying /dev is now:

```
total 4

drwxr-xr-x   2 root root   31 Jun 17 11:20 ./

drwxr-xr-x  20 root root 4096 Sep 13 18:11 ../

crw-rw----   1 root root 5, 1 Nov 30 02:03 console

crw-rw----   1 root root 1, 3 Jun 17 11:20 null

```

----------

## xsteadfastx

it was the initrd which made the problems.....so i didnt used genkernel and everything works now  :Smile:  i just have one crazy boot failure but maybe someone can help  :Smile: 

```
Couldn't initialize miscdevice /dev/synth
```

----------

## jah2

I also upgraded from 2.4 to 2.6 (2.4.27-hardened-r2  to 2.6.7-hardened-r16) and was having problems. I am and was using a monolithic kernel, no module support.  I followed the directions in the Gentoo Linux 2.6 migration guide to the letter, making the recommended kernel changes, adding "udev gentoo=nodevfs" and "udev" to my boot options and even consulting the Gentoo udev Guide. Even so my system wouldn't boot, complaining about /dev/null and /dev/console.  I could boot with a 2.6 kernel that had devfs enabled as well as the automount option but then both devfsd and udevd were running at the same time and I got a lot of "modprobe: FATAL: Could not load /lib/modules/2.6.7-hardened-r16/modules.dep: No such file or directory" and "devfsd[9331]: error calling: "unlink" in "GLOBAL" messages. Finally I changed the RC_DEVICE_TARBALL variable in /etc/conf.d/rc to "no" and that solved the problem. In all the doc, that was mentioned as being an optional change that you might want to make AFTER you got everything working correctly. I finally changed it just for kicks since I had run out of ideas. Frustrating as hell. Anybody having probs, give it a try.

----------

