You are not logged in.

#1 2018-05-18 16:29:42

thugwaffle
Member
Registered: 2016-06-12
Posts: 13

[SOLVED] Kernel panic attempting to boot

My machine went through a power cycle while I was attempting to shut down, so there seems to have been some corruption that occurred.

When I boot, I see the error message

switch_root: failed to execute /sbin/init: No such file or directory

and a kernel panic. I'm unsure how to read the entirety of the logs including everything off the screen, so I'm not certain that there aren't other errors that precede this.

When I boot from a live USB, I see that /sbin/init does exist. However, running ldd on it shows that it's missing the libsystemd-shared-238.so and libcryptsetup.so.12 shared libraries. libsystemd-shared-238.so does genuinely seem to be missing, but I see libcryptsetup unter /lib.

Correct me if I'm wrong: I'm hoping that chrooting into the fs and running mkinitcpio -P should clear up the issues with finding shared libraries. Unfortunately, I run into similar issues when I run chroot. sh and bash can't find readline and zsh can't find libcursesw, even though they exist in the filesystem under /lib and /usr/lib.

Any suggestions of where to go from here?

Last edited by thugwaffle (2018-05-21 03:33:18)

Offline

#2 2018-05-18 16:32:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,300

Re: [SOLVED] Kernel panic attempting to boot

For all intents and purposes follow this:  https://wiki.archlinux.org/index.php/Pa … an_upgrade

But this reads like a load of stuff that shouldn't have been part of a potential update and thus in danger of corruption was broken, so maybe before going through that update procedure, verify that your disk isn't dying run a long self test from a live disk and look at the smartctl -a output after the test finished, post it here if you want help interpreting it.

Last edited by V1del (2018-05-18 16:35:39)

Offline

#3 2018-05-18 19:12:15

thugwaffle
Member
Registered: 2016-06-12
Posts: 13

Re: [SOLVED] Kernel panic attempting to boot

After running smartctl -t short /dev/sda and smartctl -a /dev/sda, I see

ID# ATTRIBUTE_NAME          FLAG    VALUE WORST THRESH TYPE     UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0032  100   100   000    Old_age  Always       -       1
  9 Power_On_Hours          0x0032  100   100   000    Old_age  Always       -       4270
 12 Power_Cycle_Count       0x0032  100   100   000    Old_age  Always       -       4815
170 Unknown_Attribute       0x0033  096   100   010    Pre-fail Always       -       0
171 Unknown_Attribute       0x0032  100   100   000    Old_age  Always       -       0
172 Unknown_Attribute       0x0032  100   100   000    Old_age  Always       -       0
174 Unknown_Attribute       0x0032  100   100   000    Old_age  Always       -       27
183 Runtime_Bad_Block       0x0032  100   100   000    Old_age  Always       -       0
184 End-to-End_Error        0x0033  100   100   090    Pre-fail Always       -       0
187 Reported_Uncorrect      0x0032  100   100   000    Old_age  Always       -       0
190 Airflow_Temperature_Cel 0x0032  030   100   000    Old_age  Always       -       30 (Min/Max 16/47)
192 Power-Off_Retract_Count 0x0032  100   100   000    Old_age  Always       -       27
194 Temperature_Celsius     0x0032  030   100   000    Old_age  Always       -       30 (Min/Max 16/47)
199 UDMA_CRC_Error_Count    0x0032  100   100   000    Old_age  Always       -       0
225 Unknown_SSD_Attribute   0x0032  100   100   000    Old_age  Always       -       284182
226 Unknown_SSD_Attribute   0x0032  100   100   000    Old_age  Always       -       65535
227 Unknown_SSD_Attribute   0x0032  100   100   000    Old_age  Always       -       57
228 Power-off_Retract_Count 0x0032  100   100   000    Old_age  Always       -       65535
232 Available_Reservd_Space 0x0033  096   100   010    Pre-fail Always       -       0
233 Media_Wearout_Indicator 0x0032  087   100   000    Old_age  Always       -       0
241 Total_LBAs_Written      0x0032  100   100   000    Old_age  Always       -       284162
242 Total_LBAs_Read         0x0032  100   100   000    Old_age  Always       -       379665
249 Unknown_Attribute       0x0032  100   100   000    Old_age  Always       -       45988

SMART Error Log not supported

SMART Self-test log structure revision number 1
Num  Test_Description Status                    Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline    Completed without error         00%      4269         _
# 2  Short offline    Completed without error         00%      4268         _
# 3  Short offline    Completed without error         00%      2003         _


SMART Selective self-test log data structure revision number 1
SPAN  MIN_LBA  CURRENT_TEST_STATUS
   1        0  Not_testing
   2        0  Not_testing
   3        0  Not_testing
   4        0  Not_testing
   5        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

After running a pacman upgrade and rebooting, I see that the systemd-modules-load service failed, as did attempting to mount /boot, and I'm kicked into emergency mode. In journalctl -xb, I see some lines saying

Failed to lookup alias 'vboxdrv': Function not implemented
Failed to lookup alias 'vboxpci': Function not implemented
Failed to lookup alias 'vboxnetadp': Function not implemented
Failed to lookup alias 'vboxnetflt': Function not implemented

Mounting boot fails with the error

mount: /boot: unknown filesystem type 'vfat'

Offline

#4 2018-05-21 03:32:55

thugwaffle
Member
Registered: 2016-06-12
Posts: 13

Re: [SOLVED] Kernel panic attempting to boot

After searching through other forum posts, it looks like systemd was attempting to bootload an older version of the kernel (4.16.3-1) but I had upgraded to 4.16.9-1. Solved this by downgrading the kernel, booting successfully, and then running a full system upgrade. Thanks for the guidance V1del!

Offline

#5 2018-05-21 14:43:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,232

Re: [SOLVED] Kernel panic attempting to boot

thugwaffle wrote:

After searching through other forum posts, it looks like systemd was attempting to bootload an older version of the kernel (4.16.3-1) but I had upgraded to 4.16.9-1. Solved this by downgrading the kernel, booting successfully, and then running a full system upgrade. Thanks for the guidance V1del!

First, systemd has nothing to do with the loading of the kernel.  Zero, zip.  Conversely, systemd is started by the kernel as PID 1 and is the init system that brings up user space.

Your bootloader was starting 4.16.3-1.  It still is.  You had installed 4.16.9-1, but failed to update your boot partition.  As such, when 4.16.3-1 started, it could not find its drivers and modules, and it paniced. When you downgraded, you put the old modules back, but still did not change the boot partition.   

The correct fix for this is to find out why the boot partition is not mounted, fix that, then update the kernel.  This time, the kernel that is launched by the boot loader will be updated as well.


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

Online

#6 2018-05-22 01:15:28

thugwaffle
Member
Registered: 2016-06-12
Posts: 13

Re: [SOLVED] Kernel panic attempting to boot

Thanks for taking the time to help me develop a better understanding of how my system works ewaller. What you say makes sense. In this case, after I'd successfully logged in, I did a full-system upgrade (pacman -Syyu) and rebooted, so I'm on the latest kernel and everything seems to be working fine.

Offline

Board footer

Powered by FluxBB