You are not logged in.

#1 2020-01-06 02:46:51

zjykzk
Member
Registered: 2020-01-06
Posts: 4

kernel panic: failed to execute init (error -2)

after upgrading the kernel to 5.4.7, the system cannot boot. it output the following message:

i have no idea now, thx

Wechat-IMG410.jpg

Last edited by zjykzk (2020-01-06 04:00:05)

Offline

#2 2020-01-06 03:26:24

fukawi2
Administrator
From: .vic.au
Registered: 2007-09-28
Posts: 5,824
Website

Re: kernel panic: failed to execute init (error -2)

Start by booting the install ISO, chroot'ing into your install and re-running mkinitcpio
https://wiki.archlinux.org/index.php/Ch … rch-chroot

Also: https://wiki.archlinux.org/index.php/Ge … nel_panics

Offline

#3 2020-01-06 04:51:08

zjykzk
Member
Registered: 2020-01-06
Posts: 4

Re: kernel panic: failed to execute init (error -2)

fukawi2 wrote:

Start by booting the install ISO, chroot'ing into your install and re-running mkinitcpio
https://wiki.archlinux.org/index.php/Ch … rch-chroot

Also: https://wiki.archlinux.org/index.php/Ge … nel_panics

i just executed the command `mkinitcpio -p linux`, the kernel is also panic.

anything else to do ? thx

Last edited by zjykzk (2020-01-06 04:55:59)

Offline

#4 2020-01-06 05:05:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,352
Website

Re: kernel panic: failed to execute init (error -2)

Did you try and follow the advice of the error message and explicitly pass your init location as a kernel parameter?

And just rebuilding the intramfs and hoping is not much of a strategy. Read your logs and see what happened during the upgrade. Try downgrading the kernel. Try helping yourself.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2020-01-06 06:14:54

zjykzk
Member
Registered: 2020-01-06
Posts: 4

Re: kernel panic: failed to execute init (error -2)

jasonwryan wrote:

Did you try and follow the advice of the error message and explicitly pass your init location as a kernel parameter?

And just rebuilding the intramfs and hoping is not much of a strategy. Read your logs and see what happened during the upgrade. Try downgrading the kernel. Try helping yourself.

i had downgraded the kernel and added the option parameter with '/sbin/init'. it was all failed.

it produced same error message. ;(

Offline

#6 2020-01-06 06:53:42

frostschutz
Member
Registered: 2013-11-15
Posts: 895

Re: kernel panic: failed to execute init (error -2)

it found /init (of the initramfs) but there is some problem with it (syntax error or anything) so something wrong with your initramfs

to figure out what's going on you might have to take a look at it directly

Offline

#7 2020-01-14 03:42:47

zjykzk
Member
Registered: 2020-01-06
Posts: 4

Re: kernel panic: failed to execute init (error -2)

fixed, some so file is missing in the initramfs-linux.img file

the checking command is

mkdir /tmp/foo
cd /tmp/foo
zcat /boot/initramfs-linux.img  | cpio -i
chroot . /bin/sh

set these files'path in the field FILES in the file /etc/mkinitcpio.conf, then rebuild the initramfs.

it's done

Last edited by zjykzk (2020-01-14 03:44:31)

Offline

#8 2020-02-11 10:18:55

robert.next
Member
Registered: 2016-08-24
Posts: 3

Re: kernel panic: failed to execute init (error -2)

frostschutz wrote:

it found /init (of the initramfs) but there is some problem with it (syntax error or anything) so something wrong with your initramfs

to figure out what's going on you might have to take a look at it directly

I'm facing the same issue now that I've upgraded to 5.5.2... (and all the other kernel options are broken the same way) would you mind letting us know what was the missing file (.so lib?) on your initramfs?

Is this a systemic issue? (ie. broken mkinicpio scripts) or this is a weird occurrence due some rootfs differences?

Offline

#9 2020-02-11 10:43:13

robert.next
Member
Registered: 2016-08-24
Posts: 3

Re: kernel panic: failed to execute init (error -2)

Actually I've just found what my problem was.

Part of the linux drivers for my scanner overwrote the /usr/lib64 from being a symlink, hence when creating the initramfs some so files (thanks zjykzk) might have gone missing. So removing those offending files , recreating the symlink and regenerating the mkinitcpio my system booted again.

Offline

Board footer

Powered by FluxBB