Kernel panic after an update

New guy to fedora! Hi everybody! So I installed fedora and everything was fine and I updated it a couple of times and it went ok. But now I updated it and it had a kernel panic issue. I went to reddit to try to resolve it to a positive outcome. Kernel panic was solved. I dont know how but it got resolved. So ofc there was more updates. So i tought lets install them since the problem was fixed and it bricked itself again. I used the previous session to try to fix it again but only 1 of my monitor works in low rez. I think my nvidia drivers bricked themselves in a failed update? I have dualboot and on windows it works fine so something went bad in the updates? I will include a reddit post with pictures and what people already suggested just to simplify the explanation of the problem because I am clueless atm how to fix it becaause the problem is just getting bigger and bigger. Reddit - The heart of the internet

Being Nvidia-related, you may be interested in following this discussion as well.

Unfortunately, that’s all that I can offer. Hopefully someone with Nvidia can be of more assistance.

Nvidia drivers may not properly get updated with a kernel upgrade or driver upgrade; often caused by rebooting too soon after the update completes.

When this happens the quick and easy fix from the command line in most cases is to run sudo akmods --rebuild --force then perform another reboot after that finishes.

First off thank you for your help! Nvidia issue fixed itself with a reboot
guess?) but the main reason I started this tread is constant kernel panic after every system update. My newest version is bricked atm. How can I fix that?


Thank you for your help! How do I fix the constant kernel panic after every update? My newest version that I updated is bricked. I did it fix it (somehow?) last time by some miracle. But I updated it again and its panicking again with the same issue.


Can you boot into the rescue kernel? If so, you should be able to regenerate the initramfs using dracut, like people showed you in your Reddit thread.

If this is happening on every update though, it’s likely that you have some kernel module which is failing to build, and preventing the initramfs being created every time. It could be the nvidia drivers or it could be something else. So once you have fixed the immediate issue, that’s the next thing to investigate.

The second image you posted shows that the initramfs for the newest kernel was not properly built.
What I have done for similar symptoms is to use the grub menu and boot the last kernel that was working. I then ran 2 commands which solved the issue.
sudo dnf remove kernel*6.15.8* to remove the offending kernel
then
sudo dnf update --refresh to reinstall the later kernel and update anything else that may be needed. After this update completes wait a few minutes for everything to complete (such as building the nvidia drivers) before rebooting.

These two steps have always worked for me.

Dracut doesn’t have permission to write to boot. How do I give it permission. I did give it command dracut --regenerate-all --force but it responds with dracut[F]: No permission to write to /boot.

So I did that and it did remove the kernel panic issue but after putting in my password all I have is a black screen with a cursor on it xD I left it for a while and it logged me out. And I logged in again and same thing. Black screen with a moveable cursor.

I think with sudo it should work?

Did it. Ran it with sudo dracut --regenerate-all --force and no lines were written. Tried to close it i told me sudo was running so I left it and after a while it showed me my standard terminal line so that kinda meant its done I guess. But anyway kernel issue has been fixed at least. But now I have 2 out of 3 screens working with a black background and a moveable mouse. I did redo the 2 kernel commands hoping that would fix it but nothing. I did save the log if you want to see it? I am using a previous fully functioning version so its ok for now?

1 Like

So I ran your sudo command “sudo akmods --rebuild --force” and gotten “sudo: akmods: command not found” Any other suggestions? My games work fine on the old linux version I am using atm. Any suggestions or commands?

Use sudo with the command as was done for the kernel removal and reinstall.

With any standard terminal command, the command is still running until it returns your prompt. Always wait for the prompt.

Removing the older copy of the kernel also removes the driver, though I do not understand why it fails with the akmods command.

I have been assuming that you installed the nvidia driver as shown at rpmfusion since that is the standard way of successfully installing the drivers with the least problems.
If that is not correct then akmods may not have been installed for you.

Please let us know how the nvidia driver was installed that seems to be working on the older kernel.

So I installed Nvidia drivers on the first menu that pops up on fedora after first startup. I don’t know what it is called but it offered me Nvidia drivers and I installed it. I didn’t go to rpm fusion. I will do the rpmfusion install and see how it goes. I was suprised when I ran dracut command that it didn’t display any code. It ran but no lines of code. Or was the result good or bad. Weird. but what do I know I am new to this.

So I went on rpmfusion and ran “sudo dnf update -y” # and reboot if you are not on the latest kernel. So I rebooted it and it bricked my second latest version with the same issue. and the latest was also bricked as before. Then I went to my third (oldest) version and ran
sudo dnf install akmod-nvidia # rhel/centos users can use kmod-nvidia instead
and
sudo dnf install xorg-x11-drv-nvidia-cuda #optional for cuda/nvdec/nvenc support
the third one was already installed so nothing to do. Now the newest up to date kernel works fine. I tought linux wasn’t going to be this bad :rofl:

This appears to be a misunderstanding of the way the driver is to be installed from the startup menu.

The startup menu enables the rpmfusion-nonfree-nvidia-drivers repo when you select to enable 3rd party repos, but it does not install the drivers.

The installation of the drivers is left for the user to perform after the first boot startup config is completed.

Dracut is normally quiet as it runs unless the user tells it to be verbose with the ‘-v’ option.

Uuuuuuuuu Thank you that explains a lot now! :smiley:
Thank you for your time!