# When I boot, udev fails. [SOLVED??]

## Beetle B.

This is all still from the fallout of a major upgrade back in November where I had to update LVM, udev, and lots of other stuff.

When I upgraded udev, it informed me that my kernel was too old, and said I needed a kernel newer than 2.6.27 (or near there...).

I couldn't "fix" the problem as I was having trouble with the LVM upgrade, and so I didn't dare reboot. I left my system running for a month under these conditions (was busy with work). Long story short: I finally upgraded LVM (statically), upgraded udev, and upgraded my kernel to linux-2.6.30-gentoo-r8.

When I boot, udev complains, and I don't have access to almost all my partitions, because /dev isn't populated. I'm on baselayout-1, BTW.

```

udevd[1146]: invalid SUBSYSTEMS operation

udevd[1146]: invalid rule '/etc/udev/rules.d/10-local.rules:1'

udevd[1147]: udev: missing sysfs features; please update the kernel or disable the kernel's CONFIG_SYS_DEPRECATED option.

```

Now the thing is that option is not enabled, and does not show up in .config of the kernel. All the options listed on the UDEV guide are enabled. 

Back in November, when I upgraded udev, I also re-emerged hal after that. Right now I'm using SystemRescueCd and doing everything via chroot. I can emerge most things generally, but a few things don't emerge (hal and pango among them). I get permissions and directory/file not found errors, and the emerge hangs (it doesn't quit with an error).  

I'm using udev-146-r1, lvm2-2.02.51-r1, hal-0.5.13-r2.  

revdep-rebuild gives nothing to rebuild. 

Any ideas? I've been in this stage for weeks, and I'd really like to be able to boot into my Gentoo again, as all my work was done on that partition.

----------

## VoidMage

It's hard to tell what exactly is happening.

Did you try to mount-bind /sys to make sure it's empty before

kernel starts writing there ?

The 'deprecated' message is a result of /sys/class/mem/null.

What does 'ls -l /sys/class/mem/null' print for you ?

The kernel option is actually called CONFIG_SYSFS_DEPRECATED_V2 (in "General setup").

----------

## Mike Hunt

Probably a silly question, did you run etc-update after updating udev?

----------

## Beetle B.

 *Quote:*   

> Did you try to mount-bind /sys to make sure it's empty before
> 
> kernel starts writing there ? 

 

Forgive my ignorance. What's mount-bind?

 *Quote:*   

> What does 'ls -l /sys/class/mem/null' print for you ? 

 

Will check in a few hours (in the middle of stuff and can't boot right now).

 *Quote:*   

> The kernel option is actually called CONFIG_SYSFS_DEPRECATED_V2 (in "General setup")

 

I know, and it's disabled. 

 *Quote:*   

> Probably a silly question, did you run etc-update after updating udev?

 

Not that silly. Yes, I kind of did, but it's not complete. However, the only files that need updating are keyboard related files (I guess I must have upgraded X or something at some point). There are over a 100 of them, and at least under chroot, it thinks all of those have custom changes. I didn't complete the process, but I doubt keyboard config files play a role here.

Could that invalid rule be the cause? I think the file had never been edited since 2005 or something. Don't recall if it gave errors before all these upgrades.

----------

## VoidMage

'man mount', look for 'bind' option.

----------

## Beetle B.

 *Quote:*   

> Did you try to mount-bind /sys to make sure it's empty before
> 
> kernel starts writing there ?

 

Again, not sure why this is needed. The man page says that mount binding is simply for remounting a partition to another directory. What purpose does that serve? It's already mounted at /sys. If I mount-bind it, what should I do next?

In any case, the output of ls -l /sys/class/mem/null:

```

total 4

-r--r--r-- 1 root root 4 Jul  4  2006 dev

```

This is what it shows after I boot into the problematic Gentoo. And it's the same if I boot using the SystemRescueCD. I take it that's not what it's supposed to be? If not, how do I fix it?

I don't know if this has anything to do with it, but on the forums, I see indications that I shouldn't have ATA/ATAPI/MFM/RLL support enabled in my kernel, and instead I should have Serial ATA (prod) and Parallel ATA (experimental) drivers enabled only (along with relevant options that fall under it).

Is there anything to that? I currently have ATA/ATAPI/MFM/RLL enabled, with the latter one (Serial ATA, etc)  enabled as a module. The reason is that my motherboard is old and doesn't support SATA. One HD and both my optical drives are connected via IDE interfaces. I do have a SATA HD, but that's connected to an SATA Adapter card (connected to PCI) - which is why I have the Serial ATA etc options compiled as modules (and loaded up as modules).

----------

## VoidMage

Well, having both tends to mess things up.

I've got IDE only, but still using CONFIG_ATA driver for my board.

Also, 'ls -l /sys/class/mem/null/' != 'ls -l /sys/class/mem/null'.

As for mount-bind, it's just for checking if the dir is initially empty

(once /sys is mounted, it's not, but this will check the actual dir)

----------

## Beetle B.

 *Quote:*   

> Well, having both tends to mess things up.
> 
> I've got IDE only, but still using CONFIG_ATA driver for my board. 

 

So I can safely just enable this and turn off the old IDE one? 

If so, I'll give it a try. I'm assuming, though, that this isn't the main problem, as many other things in /dev are missing.

 *Quote:*   

> Also, 'ls -l /sys/class/mem/null/' != 'ls -l /sys/class/mem/null'

 

I'm currently in SystemRescueCD and it gives the same result as before (both commands) if I chroot into my Gentoo's root partition. 

Do you want me to mount-bind while in SystemRescueCD or do I need to boot into Gentoo first?

----------

## Beetle B.

mount-binding /sys while in the SystemRescueCD gives identical results. All the files/directories are from Jul 4, 2006

----------

## Beetle B.

If /sys/ should be empty, and I've booted into SystemRescueCD, is it safe for me to just delete everything in /sys/? Or do some empty directories need to be present?

----------

## Beetle B.

On a whim I renamed the current sys directory (while in SystemRescueCD) and created an empty sys directory.

It works now.    :Very Happy: 

I'd really like someone to confirm that what I did was safe, though.

----------

## VoidMage

Just as I said before, as sysfs is a pseudofilesystem, 

it should exist only as a mountpoint - an empty dir.

I do wonder, however, how anything could got written there.

----------

## cach0rr0

 *VoidMage wrote:*   

> Just as I said before, as sysfs is a pseudofilesystem, 
> 
> it should exist only as a mountpoint - an empty dir.
> 
> I do wonder, however, how anything could got written there.

 

I can't remember for the life of me where I saw it, but I could have sworn I'd seen a bug related to vestigial files remaining in /sys after a udev upgrade. 

If I could recall further details I'd be able to think of the relevant terms to google for =/

----------

## Beetle B.

Probably not the bug you saw, but I'm not the only one with this problem:

https://bugs.gentoo.org/show_bug.cgi?id=301131

----------

