Bug 156666 - exec of init (/sbin/init) failed on reboot following crash
Summary: exec of init (/sbin/init) failed on reboot following crash
Alias: None
Product: Fedora
Classification: Fedora
Component: sysvinit
Version: 3
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-03 00:55 UTC by Kevin R. Page
Modified: 2007-11-30 22:11 UTC (History)
0 users

Clone Of:
Last Closed: 2005-05-03 00:58:55 UTC

Attachments (Terms of Use)

Description Kevin R. Page 2005-05-03 00:55:45 UTC
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):

How reproducible:
Didn't try

Additional info:

Comment 1 David Lawrence 2007-06-22 02:18:23 UTC
Package name is now sysvinit in latest Fedora.

Note You need to log in before you can comment on or make changes to this bug.