Arthur Andersen

Kernel Panic: No working init found

tilarchlinux

For the second time I performed a `pacman -Syyu` to update my system and yet again with the kernel update an unbootable system was produced.

TL;DR

Pacman seemed to have deleted the /usr/lib64 symlink so that mkinitcpio built an incomplete initramfs.

  • Check /boot/initramfs-linux.img is too small (~ 2.3 MB)
  • Ensure existence of symlink ln -s /usr/lib64 -> /usr/lib
  • Rebuild initramfs via mkinitcpio -p linux
  • Check /boot/initramfs-linux.img is about 7.4 MB
  • Reboot

Text and Links and Stuff

The error message upon restart read the following:

ACPI Error: Method parse/execution failed \_PR.CPU0._PDC, AE_AML_OPERAND_TYPE (20180105/psparse-550)
Failed to execute /init (error -2)
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel.  See Linux Documentation/admin-guide/init.rst for guidance.

When I booted into a archlinux console from the installation USB stick and chroot~ed into the system I looked into the ~/boot directory and found the following:

$ ls -alh /boot
total 42M
drwxr-xr-x  6 root root 1.0K Jan  1  1970 .
drwxr-xr-x 20 root root 4.0K Apr 12 12:42 ..
drwxr-xr-x  4 root root 1.0K May 11 09:59 EFI
drwxr-xr-x  6 root root 1.0K Apr 12 12:52 grub
-rwxr-xr-x  1 root root  28M May 11 10:19 initramfs-linux-fallback.img
-rwxr-xr-x  1 root root 2.3M May 11 10:19 initramfs-linux.img
-rwxr-xr-x  1 root root 1.6M May  7 23:11 intel-ucode.img
drwxr-xr-x  3 root root 1.0K Apr 26  2017 loader
drwxr-xr-x  2 root root 1.0K Apr 12 12:27 syslinux
-rwxr-xr-x  1 root root 5.0M May  9 14:21 vmlinuz-linux

The peculiar thing here is, that the size of the initramfs-linux.img is too small. Normally it is something like 7.4 MB in size!

Some searching revealed that pacman might remove the /usr/lib64 symlink: Archlinux forums.

So I created the link and rebuilt the initramfs:

ln -s /usr/lib /usr/lib64
mkinitcpio -p linux

After that everything seemed to be fine again:

$ ls -alh /boot
total 42M
drwxr-xr-x  6 root root 1.0K Jan  1  1970 .
drwxr-xr-x 20 root root 4.0K Apr 12 12:42 ..
drwxr-xr-x  4 root root 1.0K May 11 09:59 EFI
drwxr-xr-x  6 root root 1.0K Apr 12 12:52 grub
-rwxr-xr-x  1 root root  28M May 11 10:19 initramfs-linux-fallback.img
-rwxr-xr-x  1 root root 7.4M May 11 10:19 initramfs-linux.img
-rwxr-xr-x  1 root root 1.6M May  7 23:11 intel-ucode.img
drwxr-xr-x  3 root root 1.0K Apr 26  2017 loader
drwxr-xr-x  2 root root 1.0K Apr 12 12:27 syslinux
-rwxr-xr-x  1 root root 5.0M May  9 14:21 vmlinuz-linux

Booting works!