Kernel panic no init found after installing Saucy

Tom H tomh0665 at gmail.com
Mon Aug 12 08:17:59 UTC 2013


On Mon, Aug 12, 2013 at 12:45 AM, Nils Kassube <kassube at gmx.net> wrote:
> Colin Law wrote:
>>
>> I have installed from the Saucy 64 bit desktop daily image onto a
>> spare partition (sda3) on my PC and the install appeared to go without
>> problems.  However when I try to boot it I get a kernel panic - not
>> syncing: No init found.  Booting into 13.04 on the other partition is
>> still ok and from there I can see that that syslog does not exist so
>> I presume it is failing before it gets as far as starting loggin.
>> When I boot into recovery mode I can see the terminal o/p before the
>> failure.  The lines immediately before the failure are:
>>
>> Freeing unused kernel memory: 864k freed
>> Write protecting the kernel text: 6232k
>> Write protecting the kernel read-only data: 2500k
>> NX-protecting the kernel data 4008k
>> Failed to execute /init
>> Kernel panic - not syncing: No init found
>>
>> I can see that initrd.img exists and is a link to
>> boot/initrd.img-3.10.0.6-generic which is 17.1MB
>
> The message "no init found" probably means that there is no executable
> "init" in the initrd. You can check it with these commands in a
> terminal:
>
> mkdir /tmp/test-initrd
> cd /tmp/test-initrd
> cat /PATH/TO/YOUR/INITRD | gunzip | cpio -i
> ls -l init
>
> That should extract the contents of the initrd and show the "init"
> script (or at least that's what it does on my 12.04 machine).

There's an "/init" shell script on an initramfs but this isn't the
"init" that's missing. You can use "lsinitramfs" to peak into an
initrd created by initramfs-tools without unpacking it. If you do
choose to unpack it it's better to pipe to "cpio -id
--no-absolute-filenames".

It's "/sbin/init" on the root filesystem that's not being found,
usually because the "root=..." on the kernel cmdline is incorrect, the
scsi driver of "/" isn't loaded, or the driver of the filesystem of
"/" isn't loaded.

The first thing that I'd check is whether the initrd is listed and
pointed to correctly in "grub.cfg".

If you add "break=bottom" at the kernel cmdline, you should be able to
check that the initrd is loading and then that root is mounted, etc.

Can you boot from the grub cmdline? (You can access it by typing "c"
rather than "e" at the grub menu.)

Once at the grub cmdline, type "ls" and "set" and make sure that the
output's correct. "ls" should list disks and partitions and set
"prefix=" and "root=".

Then (assuming that "/boot" isn't a standalone partition) enter "linux
/boot/vmlinuz-3.10.0.6-generic root=/dev/sda3 ro debug". If you know
your filesystem's UUID, it would be better to use "root=UUID=<UUID>"
(if you have just one disk, it shouldn't really matter). Tab
completion's available so you don't have to type the entire vmlinuz
filename.

Then "initrd /boot/initrd.img-3.10.0.6-generic". Tab completion's
available so you don't have to type the entire initrd filename.

Then "boot". If it doesn't boot, "debug" above might give you more
clues as to why.

If the above doesn't help, check from 13.04 that 13.10's "/sbin/init"
exists and that there are no missing files in the output of "ldd
/sbin/init" or "readelf -d /sbin/init | grep NEEDED" and check that
13.10's "/lib64/ld-linux-x86-64.so.X" exists and points at
"ld-2.YZ.so" (X,Y,Z are placeholders); you could also check the output
of ldd or readelf for it but I'm pretty sure that it's
statically-linked.




More information about the ubuntu-users mailing list