Fedora: Solving “initframfs” Kernel Panic Issue

This is not much of a post, so much as a reminder for myself. Something specific to my system makes it so that occasionally Fedora issues a Kernal Panic warning, and I have to select a prior version to load. Three times now I have had to locate this Stack Exchange web page to fix the problem, so I thought I should just record the way to solve the problem here. Although I think I may end up trying Debian with Gnome next time I have time to rebuild my system. I think I would get a lot out of the stability that both offer. I think using Gnome instead of KDE will be the largest adjustment, but also will be fun to try.

Note that the first option uses their version, and you should replace your own in the two bolded spaces and note the exclusion of .img in the second. Anywho, here it is. [source]

The solution was simple:
  1. Boot with a kernel that works (press Esc to see available boot entries on startup).
  2. Rebuild initramfs for the problematic kernel with dracut: dracut /boot/initramfs-4.18.0-305.19.1.el8_4.x86_64.img 4.18.0-305.19.1.el8_4.x86_64
    
  3. Reboot.
  4. Login, and see if the problematic kernel is running:
    
    $ uname -r
    4.18.0-305.19.1.el8_4.x86_64

Or if that feels complicated, another use from a forum said the second option worked for them.

This worked for me:

ls -la /boot

dracut  -f --regenerate-all

ls -la /boot

reboot

I’m not savvy enough to fully understand the differences, but the first one rebuilds only the specific kernel version and so should be safer. The second one forces the regeneration of initramfs for all installed kernels. The first is probably safer if I had to guess, but the second is more user friendly.

Leave a Comment