From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416 Fedora/1.0.3-1.3.1 Firefox/1.0.3
Description of problem:
Not a bug per se; but I didn't find any clues to solve this, only false leads (corrupt filesystem, selinux etc.), so hopefully this might help someone else in the right direction. I found it fairly non-obvious to start with!
My machine crashed (I suspect a hardware fault). On reboot, the kernel was uncompressed and started to boot until:
Switching to new root
exec of init (/sbin/init) failed!!!: 2
umount /inited/dev failed: 2
kernel panic - not syncing: Attemped to kill init!
Suspecting a bad initrd, I tried all the kernels I had installed, but all failed with the same error.
Booting to rescue disk, I verifed the filesystems - ok.
chroot /mnt/sysimage (where FC rescue mounts the filesystem) also failed with:
chroot: cannot execute /bin/sh: No such file or directory
but /mnt/sysimage/bin/sh existed, and could be run.
The solution was to rebuild ld.so.cache, e.g.
chroot /mnt/sysimage /sbin/ldconfig
Following this I could successfully chroot, and init wouldn't fail on boot.
Yeah, it hadn't occured to me that the "no such file" was probably refering to a shared library, not the executable itself; or indeed that init wouldn't be statically linked.
I guess ld.so.cache was midway through rebuild when the machine went down?
Version-Release number of selected component (if applicable):
Package name is now sysvinit in latest Fedora.