[arch-general] Kernel panic at boot after hard reset: not syncing. No init found.

Rodrigo Rivas rodrigorivascosta at gmail.com
Tue May 7 03:34:36 EDT 2013


On Tue, May 7, 2013 at 1:58 AM, Paul Hervot <p.hervot at gmail.com> wrote:

> On Mon, May 06, 2013 at 06:47:33PM +0200, Rodrigo Rivas wrote:
> > On Mon, May 6, 2013 at 3:41 PM, Paul Hervot <p.hervot at gmail.com> wrote:
> >
> > > Hello, I know some people had this problem before but no solution seems
> > > to help me.
> > >
> > > I was playing Kerbal Space Program, the game filled up my RAM, my
> > > computer was no longer responding (it happens to me a few times a month
> > > if I forgot to close firefox before playing for example).  I had to
> hard
> > > shutdown, then on the boot I get this kernel panic.
> > > (Here is a screenshot: http://dettorer.net/kernel_panic.jpg)
> > >
> > > The init= parameter given by grub is correct: /usr/lib/systemd/systemd
> > > and I double checked the root= parameter, it is by uuid but I also
> tried
> > > by device name (/dev/sda7) and by label.
> > > I use three partitions:
> > > sda5: /boot
> > > (sda6: swap)
> > > sda7: /
> > > sda8: /home
> > > `fdisk -l /dev/sda` http://paste.awesom.eu/ux8
> > > `ls -l /dev/disk/by-uuid` http://paste.awesom.eu/85U
> > > Using the output of a new `grub-mkconfig` didn't fix it either.
> > > Here is my grub.cfg: http://paste.awesom.eu/aDR
> > >
> > > I tried running `mkinitcpio -v -p linux` (I use the 3.8 kernel from
> core
> > > but also tried the 3.9 from testing, same result)
> > > Here is my mkinitcpio.conf: http://paste.awesom.eu/yVH
> > > and the output of `mkinitcpio -v -p linux` http://paste.awesom.eu/6f3
> > >
> > >
> > Comparing your output to mine, what most intrigues me is that there are a
> > lot of lines that I have and you do not:
> >
> >     adding symlink: /usr/lib/libc.so.6 -> libc-2.17.so
> >     adding file: /usr/lib/libc-2.17.so
> >     adding symlink: /lib/ld-linux-x86-64.so.2 -> ld-2.17.so
> >     adding file: /usr/lib/ld-2.17.so
> >
> > Curiously enough, most (or all) of them are from package "glibc", so I'd
> > try first to reinstall this package.
> >
> > Note that you are getting a kernel panic: that is *not* because initramfs
> > fails to mount root. If that were the case you'd get an "early boot
> > prompt". The problem is that the kernel is unable to load the init
> program
> > from the initramfs itself. My guess is that there are several files
> missing
> > from the initramfs and so the init program is unable to start. To be
> > totally sure you can try unpacking your initramfs in a temporary file and
> > chroot to it.
> >
> > # mkdir /tmp/foo
> > # cd /tmp/foo
> > # zcat /boot/initramfs-linux.img  | cpio -i
> > # chroot . /bin/sh
> >
> > And try several commands to see what happens.
>
> Thank you for your answers.
>
> I first tried cleaning /tmp but it is a tmpfs, so it was already empty.
> I reinstalled glibc, linux, mkinitcpio and mkinitcpio-busybox, ran
> mkinitcpio and unpacked the initramfs but I can't chroot into it, here
> is my try: http://paste.awesom.eu/im9
>
> the file bin/sh exists in the initramfs but chroot seems to be unable to
> find it.


Hey, we are getting into it...  the usual reason for this the error "No
such file or directory" when that file does exist is that the ELF
interpreter, that is the dynamic loader does not exist. In Arch the dynamic
loader is /lib/ld-linux.so.2 for 32-bits and /lib/ld-linux-x86-64.so.2 for
64, and if you look into your initcpio neither of these exist!

The most likely reason for these files not being added to your initramfs is
that you have lost the "/lib -> usr/lib" symbolic link.
The interpreter is actually installed as /usr/lib/ld-linux.so.2 but it is
searched as /lib/ld-linux.so.2.

I don't know why, but I've seen it happen before. This link is in the
package "filesystem" so reinstalling this one and rebuilding the initramfs
should solve it. If not, you can create the link yourself:

# ln -s usr/lib /lib


>
Though it seems not to be a problem with grub2, I reinstalled it and
> generated a new grub.cfg, it still panic.
>
> --
> Paul `Dettorer` Hervot (hervot_p)
> EPITA 2016
> Membre Prologin | Vice-président GConfs
>

-- 
Rodrigo


More information about the arch-general mailing list