Repairing installation because of kernel panic

My system since some days is not booting from a kernel panic after starting switch root . I find no other message that help more to find the source of the problem I was able to boot from a usb key.

  • I ran fsck and found no error.

  • there was nothing in /var/log as no log file were modified after the error began.

  • I found a lot of file in lib64 that are zero size but I am not sure it is some way of not using anymore old library as the link to the file is also missing
    -there is no way to boot to terminal from the grub option as I got the kernel panic before
    it finish
    -The documentation on repairing is not helping by not mentioning what to do if the system is able to access the mounted drive

  • the error message is Attempted to kill init! exitcode=0x00007f00
    the file /sbin/init link to /lib/systemd/systemd exist

Is there some commands to repair an sintallation from a mounted fdrtive ?
I don’t wnant to reinstall as I will lose another 2 weeks

Is this a new install that has never booted or a system that previously worked and now doesn’t?

If it previously booted and now does not what has changed / updated recently?

Is this after a power outage, forced shutdown, or other interruption to operation?

What version are you running?

Why would a new install take 2 weeks?

Obviously you are able to access the drive if you were able to run fsck on it. Booting to the USB, mounting the installed drive, doing a chroot to the mounted drive, then running the repair commands you have found should fix the issue.

Let us know in detail exactly where you are stuck and we can help. Your generic description and lack of detail make it difficult to even give a little helpful advice.

I tried to chroot and receive a message “We trust you have receive the usual lecture from the local System Administrator…”
failed to run command /bin/bash" no such file or directory

I assume that it was because they are on different partition
/dev/sdc4 / btrfs subvol=root
/dev/sdc3 /boot ext4
/dev/sdc4 /home btrfs subvol=home
I have 2 more data drive

It was a system that was working , if was forced to shutdown and restart a few times because the
monitor was broken so it took me a few boots before to realize it.

the 3 choice I have at boot time are Fedora 33 5.10.7 5.10.9 5.10.10
the usb drive is 5.8.15

A new install force me to spent time making the scanner work, the printer work, video driver, reinstalling all the software and adjusting settings etc. I always end up spending hours searching on internet because they are not working after the installation because the driver are not there or the new version does not import data from the old version

In the last message I tried to chroot the /boot partition . If I tried to chroot the / partition I got
error while loading share libraries: /lib64/

link from /lib64 to usr/lib64

In /usr/lib64 I have
link to with a zero file size

I am beginning to wonder if there was not an installation that was started during the reboot where the monitor was not working

I have installed some lib by downloading them on the usb os and copy them to the partition but I stop for tonight it is close to 2 AM. I was trying to do a yum install grub2-efi-* but is missing

I spent the afternoon replacing all the library missing in lib64. I am now at a point where I am able to login in text but get a blackscreen in graphics boot. There is some lines of failure in the boot.log file, the first one being the d-bus system message bus that fail to start

I am now to a point where I can login in GUI. There might still be some hidden problem because of the missings file.

I had an old problem that chrome was hanging the system that did not changed.

If you can get it to boot to gui now, then to clean things up you should do a “sudo dnf distro-sync”
Following that most things should be back to normal.

additional I guess the following might help too:

sudo dnf reinstall $(rpm -qa)

installs all installed again and hopefully fixes broken links, files, etc.

I put some file back for most /etc file missing

The sudo dnf distro-sync stop fast after kernel-module-extra-5.10.9 require the kernel 5.10.9 while I was running 5.10.10. The --skip-broken did nothing

the command dnf reinstall had problem with no match for argument: gpg-pubkey-#####
and the lines after were "installed package filename (from updates) not available

I made a yum update that installed a new kernel and delete some old file. Now ifI run the command sudo dnf distro-sync I got an error
Problem: The operation would result in removing the following protected packages: systemd, systemd-udev

It looks like you are using yum to update, and that is not 100% compatible with the way dnf does the update. Yum is a lower level tool and they do not always do the same thing since dnf is designed to handle the dependencies and yum leaves it up to the user to manage the dependencies.

Try fixing the database with “sudo rpm --rebuilddb” then repeat the “sudo dnf distro-sync” and see if it may then fix the issue. Please also be aware that having installed rpms that do not come from the official fedora repos can cause issues as well.

The version of rpm I have has no --rebuilddb and --import option
I found somewhere else
rmpdb --rebuilddb
that gave me no error or message output but running after that
“sudo dnf distro-sync"
still give me the same problem

I had to do a
dnf remove --duplicates
after that the dnf distro-sync worked.

1 Like