# updrading from udev045 to udev056

## serge

Hi everybody

Today i upgraded udev from the 045 version to the 056 one.

I run the 2.6.11-gentoo-r8 kernel.

After upgrading, at the boot init, it complained about /dev/null.

It could not open X, then I logged in console [ctl+alt+F2], as a user and it complained about bash unauthorized permissions. I could 'su root' and downgrade to 045 back. 

With 045 i have no problems at all.

Has someone else encountered the same problem?

Thank you

Serge

----------

## hollovoid7

when upgrading udev I saw a msg on what to do flash by but I didnt catch it in time, it was something about a updateudev command I think.. maybe someone else can shed light on this

----------

## BLooTze

Same here. I just upgraded to udev-056 and as instructed after emerge i issued "udevstart" and after reboot i cant login to gnome using gdm and when i tried to login in the console the said error appeared. so i downgraded to udev-045 and it works perfectly fine again.  :Very Happy: 

----------

## Cintra

Hei

genlop & portlog-info showed I updated from 045 to 056 while doing an emerge -e system.. 

the following was listed

```
 === 2005-04-14 19:50 ==== udev-056 ===

 = /var/log/portage/2473-udev-056.log =

...

 * Note: If you are upgrading from a version of udev prior to 046

 *       and you rely on the output of udevinfo for anything, please

 *       either run 'udevstart' now, or reboot, in order to get a

 *       up-to-date udev database.

 * For more information on udev on Gentoo, writing udev rules, and

 *          fixing known issues visit:

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

 === 2005-04-14 19:50 ==== udev-045 ===

 = /var/log/portage/2473-udev-045.log =

```

'emerge -e system' might not be a bad way to do it..

mvh

----------

## forever

after the upgrade You just need to make

```
etc-update
```

and accept practically all changes to all udev conf files...

for me it solved the problem. (in the old conf files there was no important part of them)

----------

## serge

If i am right, manually replacing the "file.conf" by the "._cfg_file.conf" does the same that "etc-update" is supposed to do.

I replaced all the config files by the new ones but still had this problem. Fortunately I did a back-up of the original files.

----------

## forever

can You please do?:

 *Quote:*   

> ls -la /dev/null

 

----------

## serge

Doing :

 *Quote:*   

> ls -la /dev/null
> 
> 

 

gives me

 *Quote:*   

> crw-rw-rw-  1 root root 1, 3 May 11 16:17 /dev/null
> 
> 

 

with udev045.

I have not checked what it gave with udev056...

----------

## forever

exactelly - IMHO it will give You 0660 instead of 0666...

YOu should verify Your /etc/udev/rules.d/50-udev.rules file and find out if You have following lines:

```
# memory devices

KERNEL="random",        NAME="%k", MODE="0666"

KERNEL="urandom",       NAME="%k", MODE="0444"

KERNEL="mem",           NAME="%k", MODE="0640"

KERNEL="kmem",          NAME="%k", MODE="0640"

KERNEL="port",          NAME="%k", MODE="0640"

KERNEL="full",          NAME="%k", MODE="0666"

KERNEL="null",          NAME="%k", MODE="0666"

KERNEL="zero",          NAME="%k", MODE="0666"

```

----------

## serge

With udev045 i get it exactly.

```
# memory devices 

KERNEL="random",        NAME="%k", MODE="0666" 

KERNEL="urandom",       NAME="%k", MODE="0444" 

KERNEL="mem",           NAME="%k", MODE="0640" 

KERNEL="kmem",          NAME="%k", MODE="0640" 

KERNEL="port",          NAME="%k", MODE="0640" 

KERNEL="full",          NAME="%k", MODE="0666" 

KERNEL="null",          NAME="%k", MODE="0666" 

KERNEL="zero",          NAME="%k", MODE="0666" 

```

----------

## forever

ok... I don't get it - is it working with the older udev or not??

----------

## serge

Sorry , i probably was not that clear.

With the older version of udev [udev045] it works.

Everytime i upgraded udev to a newer version, I never had problems.

But this time with udev056 i get all these mentioned problems.

----------

## forever

Ok - than - try to upgrade to the newer version and make sure You update the files I mentioned before - does it work?

----------

## serge

Ok

I will but not right now because i do not want to reboot now.

By the way as mentionned in the ebuild, i did a "udevstart" but then i did not encounter any problems/errors.

When i rebooted i got the problems.

----------

## forever

ok - do You have hotplug, coldplug installed?

Do You have it in startup configuration (did You do 'rc-update add coldplug default' and the same for hotplug?) ?

Hm... I guess yes because previous version is working for You...

It seems I'm running out of ideas  :Very Happy: 

----------

## serge

I do use hotplug but i do not use coldplug.

I will reinstall udev056 and will have a look at the rules.

Hoping it will be ok then.

By the way , a few months ago i "cloned" a second pc. I copied the hard disk to another. In the cloned pc, at boot time i always have a warning about /dev/null but it works perfectly...

----------

## forever

YOU SHOULD use coldplug... IMHO...

----------

## nightfrost

 *forever wrote:*   

> YOU SHOULD use coldplug... IMHO...

 

Why use coldplug? It just loads a bunch of modules you might not want at startup, that you can modprobe manually later, or have hotplug modprobe for you when needed.

Anyway, I've had the mentioned problem. What fixed it for me was simply adding udevstart to /etc/conf.d/local.start  :Wink:  brilliant, huh?

I remember /dev/null having crw-------- unless udevstart was run.

----------

## serge

Nightfrost, I will try your tip!

Thank you!

----------

## serge

By the way, udev045 has a /etc/udev/permissions directory.

With udev056 this directory does not exist anymore.

What does manage the permissions with udev056?

----------

## forever

 *serge wrote:*   

> By the way, udev045 has a /etc/udev/permissions directory.
> 
> With udev056 this directory does not exist anymore.
> 
> What does manage the permissions with udev056?

 

options in the rules configuration file.

----------

## serge

I used Nightfrost's tip and it works.

But i noticed one thing:

In /etc/udev/udev.conf, we have:

 *Quote:*   

> # udev_db - The name and location of the udev database.
> 
> #           NOTE: this should be somewhere that is writable before
> 
> #                 / is mounted rw, like /dev ...
> ...

 

udev056 does not create this file.

With the udev045 version, in /etc/udev/udev.conf, we have:

 *Quote:*   

> # udev_db - The name and location of the udev database.
> 
> #           NOTE: this should be somewhere that is writable before
> 
> #                 / is mounted rw, like /dev ...
> ...

 

udev045 creates this file.

Is it the problem i am facing if i do not put "udevstart" in

 *Quote:*   

>  /etc/conf.d/local.start?
> 
> 

 

----------

## forever

IMHO putting this to local.start is the workaround not a solution.

You should find out why rc scripts doesn't start it for You...

----------

## serge

It starts well with udev045, so i dont know how to find out in the rc scripts what could have been changed when upgrading to udev056...

Forever, do you use udev056? If you do, do you have the /dev/.udevdb file?

----------

## forever

yes. it works for me - but I can find it out in the evening when I'll be home.  :Very Happy: 

EDIT:

 *serge wrote:*   

> It starts well with udev045, so i dont know how to find out in the rc scripts what could have been changed when upgrading to udev056...
> 
> Forever, do you use udev056? If you do, do you have the /dev/.udevdb file?

 

Ok I'm at home so: YES I have the /dev/.udevdb - directory.

----------

## serge

I will appreciate. It is the first time that i update udev and i have this kind of problem.

What i do not understand is why this ".udevdb" file is not created.

----------

## Cintra

Have a look here..

https://forums.gentoo.org/viewtopic-t-316544-highlight-udev+dev+null.html

mvh

----------

## serge

Thank you Cintra but this post does not help me...

----------

## serge

I re-installed [re-emerged] udev056 , I erased from

/etc/conf.d/local.start

```
udevstart

```

I rebooted the pc and strangely everything is ok...

----------

## forever

good to read that  :Very Happy: 

Now change the topic to [solved]  :Very Happy: 

----------

## RayDude

 *serge wrote:*   

> I re-installed [re-emerged] udev056 , I erased from
> 
> /etc/conf.d/local.start
> 
> ```
> ...

 

I just upgraded to 056 and I got the same problem.

I happened to notice that the mode on /dev/null is:

crw-rw---- null

It did not work and I couln't log in as user.

I went back to 045 and it works now. Does anyone have an understanding of this?

Raydude

----------

## jdgill0

RayDude,

When you upgraded to 056, did you accept the changes when running etc-update, which you did run?

----------

## RayDude

 *jdgill0 wrote:*   

> RayDude,
> 
> When you upgraded to 056, did you accept the changes when running etc-update, which you did run?

 

Thanks for reminding me. I didn't see that files needed to be updated when I did my emerge world. When I went back to 045, the system told me that there were files that needed to be updated in /etc so I updated them by hand (I always do, I don't trust etc-update, once bitten twice shy I guess). That made the new files compatible with 056, even though I was running 045 and it worked.

I just updated back to 056 and its working fine.

So to make a long story short: make sure you update the /etc files for udev 056!

Thanks again,

Raydude

----------

## jdgill0

RayDude,

This is a bit off-topic, but to avoid problems of accidentally overwriting config files you can use tools such as RCS or CVS. They would allow you to roll back in case of accidents.  I have been aiming to implement such a thing myself, but have been too lazy ... until I killed my /etc/conf.d/hdparm file a couple days ago with etc-update  :Smile:  ... now I have /etc/conf.d in my own CVS repository.  If you don't want to mess with CVS, you can always use RCS, however to setup and use your own personal CVS is not difficult either -- no need for pserver, chroot, etc...

Again sorry for being off-topic here.

----------

## RayDude

 *jdgill0 wrote:*   

> RayDude,
> 
> This is a bit off-topic, but to avoid problems of accidentally overwriting config files you can use tools such as RCS or CVS. They would allow you to roll back in case of accidents.  I have been aiming to implement such a thing myself, but have been too lazy ... until I killed my /etc/conf.d/hdparm file a couple days ago with etc-update  ... now I have /etc/conf.d in my own CVS repository.  If you don't want to mess with CVS, you can always use RCS, however to setup and use your own personal CVS is not difficult either -- no need for pserver, chroot, etc...
> 
> Again sorry for being off-topic here.

 

Good idea. Thanks. If I only had time...

Raydude

----------

