Today, my root partition (reiserfs) went totally wonky, so I had to rebuild it with reiserfsck --rebuild-tree. Of course some files were lost, including whatever database devfs has. Upon rebooting, I got no /dev/hdb3, which is my root partition. This made checkroot (via reiserfsck) output, "Failed to open the filesystem. If the partition table has not been changed, and the partition is valid and it really contains a reiserfs partition, then the superblock is corrupted and you need to run this utility with --rebuild-sb." ...which was fairly confusing until I understood /dev/hdb3 was lost. Starting devfsd gave it back, but it wasn't saved when the system rebooted, which always happens right after the "singleuser" you get if checkroot fails. The solution to the problem was to run devfsd in init.d/checkroot. Possibly fsck and/or checkroot should complain if the root device node doesn't exist, or even make sure devfs is started before that point. It's probably (hopefully) a fairly unusual problem, but I thought I should type it in, anyway. Someone else might fall on it too... Another possibly cause of the problem is that many symlinks in /lib went wacko (libm, libresolve... ldconfig fixed that), but I don't really see how that can relate. Reproducible: Didn't try Steps to Reproduce: 1. crash your disk, so devfs gets confused 2. boot ;) Actual Results: A gentoo install that refuses to boot. Expected Results: Booted. Fairly updated gentoo install.
This is one of those times you boot with a rescue disk/cd and go from there. I can anyhow not see how running devsfd in checkroot will fix anything, as it should have been run before that already (except if it failed, then dropped you to prompt, and you fixed whatever, and did not reboot or something, but then its really no reason to add a kludge which would have not been needed in the first place with a rescue disk/cd). The proper 'fix' which I see for this, is good rescue disks, and I am sure our livecd's fits the bill. If not, then rather file a bug about what is missing from it to help get your system up and running again in a case as this.