You are not logged in.

#1 2015-01-16 12:25:58

sebkirller
Member
Registered: 2015-01-12
Posts: 15

[SOLVED]Kernel panic init error

So this I f*** up really bad. I was in a horry and did not read the output from pacman. Pacman then updated ONLY linux 3.18.2-2. Now my system can not boot because of a init error as far as I could understand from the kernel panic page.  I followed some archwiki tutorials on downgrading with arch-chroot, I reconfigured grub because it booted the wrong partition and I redid mkinitcpio. but no matter what I tried nothing worked.
The first line of the kernel panic error is: Failed to execute /init (error -2)
second line: Kernel panic - not syncing: no working init found. try passing init= option to kernel. See linux documentation/init.txt for guidance.

Any help is super appreciated
- Cheers Sebbe

Last edited by sebkirller (2015-01-21 15:55:57)

Offline

#2 2015-01-16 12:39:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,042
Website

Re: [SOLVED]Kernel panic init error

So try passing an init option.  I'd start with init=/usr/lib/systemd/systemd.  If this works, check the output of `ls -l /usr/bin/init`, if it fails you can use init=/usr/bin/bash.  Then you can check is systemd is actually there and if needed mount partitions and run pacman.

Also, if you can describe what actually happened better we could provide better suggestions.  Upgrading the kernel only would not cause such problems.  Downgrading the kernel also wouldn't.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2015-01-16 13:15:20

sebkirller
Member
Registered: 2015-01-12
Posts: 15

Re: [SOLVED]Kernel panic init error

Trilby wrote:

So try passing an init option.  I'd start with init=/usr/lib/systemd/systemd.  If this works, check the output of `ls -l /usr/bin/init`, if it fails you can use init=/usr/bin/bash.  Then you can check is systemd is actually there and if needed mount partitions and run pacman.

Also, if you can describe what actually happened better we could provide better suggestions.  Upgrading the kernel only would not cause such problems.  Downgrading the kernel also wouldn't.

I am sorry my description was inaccurate. What I ment by it was that I updated my system with pacman -Syu and did not read what updated and just went to do something els. When I came back I saw that the kernel had been upgraded from 3.17 to 3.18 without the 3.18 linux-headers packages. After I rebooted I was presented with the kernel panic. Then I downgraded again but the problem persisted. I hope this describes my mistake better.

Both init commands gives me this output: "failed to execute /usr/lib/systemd/systemd (error -2). attempting defaults..." and "failed to execute /usr/bin/bash (error -2). Attempting defaults..."

Offline

#4 2015-01-16 15:11:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,042
Website

Re: [SOLVED]Kernel panic init error

I suspect your bootloader is mounting the wrong root partition.  Can you post your bootloader config?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2015-01-16 16:59:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,712

Re: [SOLVED]Kernel panic init error

Also, tell us about your disks and partitions.  Are you using a single disk?, multiple disks? RAID?  What are your file systems?  Is your boot partition a separate partition?
Is there any chance the boot partition was not mounted when you did your update?
What do you mean by the kernel being updated without having updated the headers?

Anyway, don't panic.  You might want to read the wiki article on chroot.  I think we may use that method to get you back to a working system.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2015-01-17 17:36:24

sebkirller
Member
Registered: 2015-01-12
Posts: 15

Re: [SOLVED]Kernel panic init error

Here is a link to pastebin wit my grub.cfg file: http://pastebin.com/gzqraKPr
I have one HDD and one SSD. The SSD is windows dedicated only. The HDD is split with half for windows and the other half for linux. The bit for linux is partitioned with separate root and home partitions. The root file system is xfs and the home partition btrfs. As far as I could understand the packages linux 3.18.2-2 requires linux-headers 3.18.2-2, which did not get downloaded because it was not uploaded until maybe 1 minute later. As for the chroot I am totally in for that as I already tried fixing grub from the arch boot cd with arch-chroot after I saw that my partitions were mounted incorrectly.

Offline

#7 2015-01-19 20:39:05

mstefano80
Member
From: Bolzano ITALY
Registered: 2015-01-19
Posts: 1
Website

Re: [SOLVED]Kernel panic init error

sebkirller wrote:

So this I f*** up really bad. I was in a horry and did not read the output from pacman. Pacman then updated ONLY linux 3.18.2-2. Now my system can not boot because of a init error as far as I could understand from the kernel panic page.  I followed some archwiki tutorials on downgrading with arch-chroot, I reconfigured grub because it booted the wrong partition and I redid mkinitcpio. but no matter what I tried nothing worked.
The first line of the kernel panic error is: Failed to execute /init (error -2)
second line: Kernel panic - not syncing: no working init found. try passing init= option to kernel. See linux documentation/init.txt for guidance.

Any help is super appreciated
- Cheers Sebbe


I had the exactly the same strange problem.
The problem is that /usr/lib64/ should be a symbolic link to the /usr/lib/, but it was a folder containing something (for me kde4/kcm_adobe_flash_player.so), also move the folder lib64 somewhere, reinstall package "filesystem" and redo makeinitcpio.
After that, /usr/lib64 become a link to /usr/lib and the generated /boot/initramfs-linux.img contains all libraries needed to boot, systemd as well!

Also, boot the system with arch-live usb stick and at prompt :

mount /dev/sdb4 /mnt
mount /dev/sdb2 /mnt/boot          # obviously change the device names accordingly with your system :D
arch-chroot /mnt
mv /usr/lib64 /root/               # or somewhere you want
pacman -S filesystem
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount -R /mnt
reboot

Remove usb stick and at GRUB enjoy the resumed Arch big_smile big_smile big_smile
------

Useful for me was this thread : https://bbs.archlinux.org/viewtopic.php … 2#p1353982

Offline

#8 2015-01-21 11:25:49

joelmandell
Member
Registered: 2015-01-21
Posts: 1

Re: [SOLVED]Kernel panic init error

What mstefano80 writes, did certainly work for me!
I did in fact an whole reinstall, no problem as I had a separate /home partition. But got the problem yesterday, and find this solution most helpful! Thank you.

mstefano80 wrote:

I had the exactly the same strange problem.
The problem is that /usr/lib64/ should be a symbolic link to the /usr/lib/, but it was a folder containing something (for me kde4/kcm_adobe_flash_player.so), also move the folder lib64 somewhere, reinstall package "filesystem" and redo makeinitcpio.
After that, /usr/lib64 become a link to /usr/lib and the generated /boot/initramfs-linux.img contains all libraries needed to boot, systemd as well!

Also, boot the system with arch-live usb stick and at prompt :

mount /dev/sdb4 /mnt
mount /dev/sdb2 /mnt/boot          # obviously change the device names accordingly with your system :D
arch-chroot /mnt
mv /usr/lib64 /root/               # or somewhere you want
pacman -S filesystem
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount -R /mnt
reboot

Remove usb stick and at GRUB enjoy the resumed Arch big_smile big_smile big_smile
------

Useful for me was this thread : https://bbs.archlinux.org/viewtopic.php … 2#p1353982

Offline

#9 2015-01-21 15:55:31

sebkirller
Member
Registered: 2015-01-12
Posts: 15

Re: [SOLVED]Kernel panic init error

joelmandell wrote:

What mstefano80 writes, did certainly work for me!
I did in fact an whole reinstall, no problem as I had a separate /home partition. But got the problem yesterday, and find this solution most helpful! Thank you.

mstefano80 wrote:

I had the exactly the same strange problem.
The problem is that /usr/lib64/ should be a symbolic link to the /usr/lib/, but it was a folder containing something (for me kde4/kcm_adobe_flash_player.so), also move the folder lib64 somewhere, reinstall package "filesystem" and redo makeinitcpio.
After that, /usr/lib64 become a link to /usr/lib and the generated /boot/initramfs-linux.img contains all libraries needed to boot, systemd as well!

Also, boot the system with arch-live usb stick and at prompt :

mount /dev/sdb4 /mnt
mount /dev/sdb2 /mnt/boot          # obviously change the device names accordingly with your system :D
arch-chroot /mnt
mv /usr/lib64 /root/               # or somewhere you want
pacman -S filesystem
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
exit
umount -R /mnt
reboot

Remove usb stick and at GRUB enjoy the resumed Arch big_smile big_smile big_smile
------

Useful for me was this thread : https://bbs.archlinux.org/viewtopic.php … 2#p1353982


I can confirm that this actually solved the problem and that my computer is now fully functional again.
Thank you mstefano80 for your excellent guidance and help! You really did save my weekend smile

- Much gratitude, sebbe

Offline

#10 2015-08-06 02:08:10

danbrough
Member
Registered: 2015-08-06
Posts: 2

Re: [SOLVED]Kernel panic init error

I've come across this bug with 2 machines now.
I'm not sure what was wrong with the first machine as I ended reinstalling to get it working again.
With the second machine it turns out the symlink /usr/lib64 -> /usr/lib was missing.
No idea where it went and I sure didn't remove it.  Was it ever there?
Creating this link and running `mkinitcpio -p linux` was enough to create a working initramfs,

Offline

#11 2015-08-12 12:25:42

dxkpf
Member
Registered: 2015-08-12
Posts: 1

Re: [SOLVED]Kernel panic init error

Thank you very much smile
I've been having the same problem the last days and just wanted to drop a huge thanks for your help, you saved me a reinstall.

Offline

#12 2015-08-16 06:14:01

boogerlad
Member
Registered: 2013-04-20
Posts: 48

Re: [SOLVED]Kernel panic init error

This fixed it for me. Thank you!!!

Offline

#13 2016-06-25 06:35:00

ElectricPrism
Member
Registered: 2012-12-07
Posts: 33

Re: [SOLVED]Kernel panic init error

@mstefano80 Thanks, the symlink was also the problem for me.

I encountered this problem when switching from Linux VFIO [AUR] to Linux.

Incase anyone is interested here is the contents of /usr/lib64/

➜  lib64.trash ls -la
total 1424
drwxr-xr-x 1 root root     100 Jun 14 22:43 .
drwxr-xr-x 1 root root     130 Jun 24 23:28 ..
lrwxrwxrwx 1 root root      13 Jun 14 22:40 libjreen.so -> libjreen.so.1
lrwxrwxrwx 1 root root      17 Jun 14 22:40 libjreen.so.1 -> libjreen.so.1.2.1
-rwxr-xr-x 1 root root 1449984 Jun 14 22:40 libjreen.so.1.2.1
drwxr-xr-x 1 root root      22 Jun 14 22:43 pkgconfig

I presume that a package I had installed from the AUR jreen somehow caused this, I also rebuilt my DKMS on a bad Arch USB disk which might have had a role too.

Thanks dude.

Offline

#14 2016-08-27 23:59:11

aleb
Member
Registered: 2013-10-14
Posts: 8

Re: [SOLVED]Kernel panic init error

Instead of running "mkinitcpio -p linux" you can also run "pacman -S linux", it's more in line with already having to run "pacman -S filesystem".

Offline

#15 2016-12-27 05:00:04

inukaze
Banned
From: Venezuela
Registered: 2011-05-06
Posts: 16
Website

Re: [SOLVED]Kernel panic init error

Hi there, i have very similar problem with "Manjaro OpenRC Xfce" the December 24 / 2016 . after update . i can't boot from another kernels, except linux4.7

(but the package linux47-nvidia-304xx don't exist more in the official repository for i can enable my 3D hardware acceleration for my GeForce 6200 TurboCache again)

Well i install all Kernels i saw on the Manjaro Utility , but ever i try to start says the mayor part of time :

Failed to execute /Init (error -2)

Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance. 

CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.39-1-MANJARO #1
Hardware name: System manufacturer System Product Name/M2N68-AM SE2, BIOS 1409        04/29/2010
0000000000000086 0000000071ca7ce6 ffffffff812d7572
ffffffff817063b8 ffff8800bbf07f48 ffffffgf81164ad6
0000000000000008 ffff8800bbf07f48 ffff8800bbf07ee0 0000000071ca7ce6

Call Trace:
[<ffffffff812d7572>] dump_stack+0x63/0x81
[<ffffffff81164ad6>] panic+0xd3/0x215
[<ffffffff8159acc0>] ? rest_init+0x90/0x90
[<ffffffff815ad99>] kernel_init+0xd9/0xe0
[<ffffffff815a757f>] ret_from_fork±0x3f/0x70
[<ffffffff8159acc0>] ? rest_init+0x90/0x90
Kernel offset: disabled
---[ end Kernel panic - not syncing:No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

But i dont know how to fix it on a OpenRC distribution, someone can help me to fix it, please ?

Offline

#16 2016-12-27 05:20:23

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,261

Re: [SOLVED]Kernel panic init error

inukaze wrote:

But i dont know how to fix it on a OpenRC distribution, someone can help me to fix it, please ?

I'll tell you right now, necrobumping a solved thread with a different problem on a different distro is not the way to get help.
https://wiki.archlinux.org/index.php/Co … bumping.22
https://wiki.archlinux.org/index.php/Co … .2Aonly.2A

Last edited by Scimmia (2016-12-27 05:20:48)

Offline

#17 2016-12-27 05:23:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,927
Website

Re: [SOLVED]Kernel panic init error

Closing.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Online

Board footer

Powered by FluxBB