Can't boot, init found but cannot execute - Kernel panic
i'm trying to repair my virtual server which after a reboot prints the following lines and doesn't start, it seem to be a problem with /etc/init but can't solve it:
[ 3.226615] md: … autorun DONE.
[ 3.336670] EXT4-fs (sda): mounted filesystem with ordered data mode. Opts: )
[ 3.338548] VFS: Mounted root (ext4 filesystem) readonly on device 8:0.
[ 3.449102] devtmpfs: mounted
[ 3.452100] Freeing unused decrypted memory: 2036K
[ 3.454042] Freeing unused kernel image (initmem) memory: 2204K
[ 3.455503] Write protecting the kernel read-only data: 32768k
[ 3.458050] Freeing unused kernel image (text/rodata gap) memory: 2028K
[ 3.460497] Freeing unused kernel image (rodata/data gap) memory: 196K
[ 3.505976] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[ 3.508027] rodata_test: all tests were successful
[ 3.509863] Run /sbin/init as init process
[ 3.682677] Run /etc/init as init process
[ 3.852167] Starting init: /etc/init exists but couldn't execute it (error -)
[ 3.854890] Run /bin/init as init process
[ 4.024199] Run /bin/sh as init process
[ 4.192354] Starting init: /bin/sh exists but couldn't execute it (error -13)
[ 4.194356] Kernel panic - not syncing: No working init found. Try passing .
[ 4.197811] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.2-x86_64-linode141
[ 4.199581] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.14
[ 4.201985] Call Trace:
[ 4.203418] dump_stack+0x6d/0x88
[ 4.204677] ? memcpy_orig+0xd0/0x10f
[ 4.205955] panic+0x101/0x2d7
[ 4.207072] ? rest_init+0xae/0xae
[ 4.208218] kernel_init+0x106/0x112
[ 4.209465] ret_from_fork+0x22/0x30
[ 4.210722] Kernel Offset: 0x1c00000 from 0xffffffff81000000 (relocation ran)
[ 4.213177] ---[ end Kernel panic - not syncing: No working init found. Try-
Does anyone know how can i solve it or what could be the problem?
Thanks in advance!
1 Reply
Observations and Notes
This line indicates that you are booting from a Linode supplied kernel pinned to a specific version:
[ 4.197811] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.2-x86_64-linode141
- According to https://www.linode.com/kernels/, this Linode Kernel became available on February 4, 2021
[ 3.338548] VFS: Mounted root (ext4 filesystem) readonly on device 8:0.
Filesystem could be mounted read-only due to filesystem errors
/sbin/init is usually a link to /lib/systemd/systemd on more recent distributions
Questions
What was happening prior to the reboot that revealed the problem?
Can you provide some background about how this Linode was created, i.e. What distribution you are using? A previous question discussed Ubuntu 18.04 LTS. Is this the same Linode?
Do you have more than one configuration profile or have you changed any configuration profile options?
What are your configuration profile options?
When was this Linode last booted successfully?
Have any file system permissions or ownership change since the last successful boot?
Things to try
- Boot the Linode in Rescue Mode and perform a file system check.
- Try booting with a configuration profile that uses "GRUB 2" as the kernel option.
Places to look for more information
- In rescue mode with /dev/sda mounted on /media/sda*, review the command history for any commands that might have altered any boot files. i.e. /media/sda/root/.bash_history.
- https://www.linode.com/docs/guides/rescue-and-rebuild/#mounting-disks
- Any commands involving the package manager, editing config files, changing permissions, etc. could be suspect.