Ok, so I'm not sure how this happened, but it was stumping me as to what I'd broken on the box. Ultimately, it turned out that in /etc/runlevels/sysinit/ there was devfs and dmesg, but not sysfs and udev. I got a partial boot with /usr and a few other criticals passing fsck, failures in localmount, and a soft hang when it when to start urandom. I don't know how it happened, but we should probably have some sort of check to help folks that might end up in a bad state like this. My fix was using the debug mode in my initramfs, chroot into my / space, and creating the missing symlinks. I was given the clue by the fact that LVM was complaining it couldn't find the sysfs mountpoint.
sysfs is not added by OpenRC because there's no guarantee it will work due to old kernels. However, udev DOES need it so it will get started if udev is correctly installed.
Can we test for a new enough kernel?
(In reply to comment #2) > Can we test for a new enough kernel? It already tests for existance of sysfs in /proc/filesystems. But simply adding it to the sysinit runlevel won't fix the failure of udev not being added either. This should be fixed in OpenRC for 0.5.0 when it gets it's own basic udev init script so it's entirely self sufficient for booting. Gentoo of course can choose to use this or continue using the existing udev script.
The code to add udev to sysinit runlevel is contained now in openrc-ebuild. This code tries to detect if udev was enabled before, and adds it in this case. Robin, maybe can have a look at the ebuild and check why it failed to add udev at your place. enable_udev=0 if [[ ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && \ [[ -e "${ROOT}"/etc/init.d/udev ]] && \ ! has_version ">=sys-apps/openrc-0.4.0" then # make sure udev is in sysinit if it was enabled before local rc_devices=$( [[ -f /etc/rc.conf ]] && source /etc/rc.conf [[ -f /etc/conf.d/rc ]] && source /etc/conf.d/rc echo "${rc_devices:-${RC_DEVICES:-auto}}" ) case ${rc_devices} in udev|auto) enable_udev=1 ;; esac fi
I tested a bunch of other machines of mine, and the udev symlink does get created there, but the sysfs one is still missing on them.
As I said earlier, sysfs is pulled in by udev and not added by OpenRC.
*** Bug 253979 has been marked as a duplicate of this bug. ***
*** Bug 255286 has been marked as a duplicate of this bug. ***
So I think someone should add a sentence/small chapter about checking udev is in sysfs runlevel to the openrc-upgrade guide.
(In reply to comment #9) > So I think someone should add a sentence/small chapter about checking udev is > in sysfs runlevel to the openrc-upgrade guide. > Like what?
(In reply to comment #10) > (In reply to comment #9) > > So I think someone should add a sentence/small chapter about checking udev is > > in sysfs runlevel to the openrc-upgrade guide. > > > > Like what? Like this, but maybe some native speaker should check it: Around the place where the chapter "Boot runlevel" is, adding a chapter udev containing: openrc no longer starts udev by default, but it now need to be present in the sysfs runlevel to be started. The openrc ebuild should detect if udev was enabled before and add it to sysfs runlevel, but it seems to fail in some cases. So, to be safe, please check if udev is present before rebooting. Code Listing 1: # ls -l ls -l /etc/runlevels/sysfs lrwxrwxrwx 1 root root 14 2009-01-29 08:00 /etc/runlevels/sysfs/udev -> /etc/init.d/udev If udev is not listed, add it to sysfs runlevel. Code Listing 2: rc-update add udev sysfs
(In reply to comment #11) Done.
Looks like the guide's been updated. Thanks Josh.
(In reply to comment #11) > sysfs stuff Please double-check this: you said the "sysfs" runlevel, so that's what I put in the guide, but today I got an email from a user who believes it to be a typo; that it should be the "sysinit" runlevel. Which is it?
(In reply to comment #14) > (In reply to comment #11) > > sysfs stuff > > Please double-check this: you said the "sysfs" runlevel, so that's what I put > in the guide, but today I got an email from a user who believes it to be a > typo; that it should be the "sysinit" runlevel. > > Which is it? I checked the ebuilds and upstream subversion: it is sysinit, not sysfs. Dunno what zzam was smokin', but it's all fixed now. :D