Nightmares with udev updates

This weekend has been a weekend from hell with servers not coming up after reboot. This is all related to the somewhat recent udev update (udev-151-r4). During the emerge it will warn you if you have some incompatible config options:

* Found sources for kernel version:
*     2.6.28-hardened-r9
* Checking for suitable kernel configuration options...
*   CONFIG_SYSFS_DEPRECATED:    should not be set. But it is.
*   CONFIG_SYSFS_DEPRECATED_V2:         should not be set. But it is.
*   CONFIG_IDE:         should not be set. But it is.
* Please check to make sure these options are set correctly.
* Failure to do so may cause unexpected problems.

If you have any of the CONFIG_SYSFS_DEPRECATED options set in your .config, your box will not come up after reboot. No matter what kernel you roll back to, it will not come up. So we're looking at LiveCD time to get things working again. Also, you need to be smart here. The udev-151-r4 will still complain about CONFIG_IDE, eventhough you have IDE drives. Removing that option will remove IDE drivers, and you'll be super hosed. Only remove the IDE option if you have SATA/SCSI drives.

The box will come up after grub, the kernel will recognize the drives but after udev starts, you will be dead in the water

Another solution to repair this is to create the devices when udev starts. If you can edit /etc/init.d/udev, create mknod statements after the stop_udevmonitor portion of the start() section of the init script. For example here would be hda mknods:

mknod /dev/hda b 3 0
mknod /dev/hda1 b 3 1
mknod /dev/hda2 b 3 2
mknod /dev/hda3 b 3 3

Udev will complain, but the devices will be created and you should be back to bootable system to repair your kernel. You can also issue this command after entering root password after it states that there were errors with the filesystem. You may need to do a mount -o remount,rw /

To update the kernel config, simple edit /usr/src/linux/.config and change the CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
to
CONFIG_SYSFS_DEPRECATED=n
CONFIG_SYSFS_DEPRECATED_V2=n

Run make menuconfig, save the config then make the kernel.