How do I fix a broken main kernel?

I recently installed Fedora on my PC, and being new to Linux in general seem to have made my main kernel unbootable after attempting to install project Digimend’s drivers for my Huion tablet. Here is what I know about the problem:

EFI won’t boot from the first kernel option
I can boot from the second kernel option just fine

How I installed the driver
I downloaded the Zip file and tried to use make on it after extracting it and installing the headers from dnf. I believe the problem is that I forgot to run “make clean” before restarting and have corrupted something or messed up a driver. How do I go about remaking the kernel in its default state and/or undoing the make command that I ran?

1 Like

To be clear, I have not run “make clean” on the backup kernel either, but I am concerned that if I do so I will break something else, so I am not going to run anything till I know for a fact it’ll at least contribute towards finding the solution.

1 Like

Does sudo dnf reinstall kernel\* work? That’ll fetch the kernels from the repos and reinstall them, undoing any changes you may have made.

Note that when installing kernel modules or drivers, you may need to sign the kernel to use it with secure boot. (This is why Nvidia drivers from RPM Fusion can only be used with secure boot disabled, unless the user manages to sign it themselves: Howto/NVIDIA - RPM Fusion )

I tried this, got the same error still. I can’t even open the console, it says something about root being locked. I checked my UEFI settings and Secure Boot is disabled. I know that it also said that there was a dependency failure for local file systems and the RPC Pipeline and the RPC security services for NFS client and server. I don’t know if I can take a screenshot while in emergency mode to help with the process of troubleshooting and such. This is all very confusing.

I found some odd errors about xorg-x11-drv-nouveau while poking around the error reporting. it doesn’t say that the backtrace contains enough meaningful information to report the issue. The module name is kernel-core and the version number is 5.14.10-300.fc35.x86_64. I do not know if this is relevant or not, but it shows up every time I boot. it does say that the system is able to recover after this happens each time, however.

May be you want to compare the first and the second boot list with sudo grubby --info=ALL. Find line part args=... if there any different.

The other things, each time we upgrade the kernel, the custom driver usually will create new module with newest kernel-devel version from the upgrade. There also a chances that it will failed because of compatibility and need to patching the driver (it happen to me with nvidia-340xx driver between each kernel upgrade, example from 5.15 to 5.16).

If above not the cases, you could try to boot to second boot list (where you know everything work well) then remove your newest installed kernel and reinstall again. You could find it with dnf list installed | grep kernel\*.

For above reason I have bash script to remove certain version of kernel. Just save as text file and run bash NAMEFILE. Just make sure you are not booting on the kernel version that you want to remove.


sudo dnf list installed kernel\*
echo -n "Please select kernel version you want to remove (exp: 5.15.0-60.fc36): "
sudo dnf remove \
    kernel-$KERNEL_VER \
    kernel-core-$KERNEL_VER \
    kernel-debug-$KERNEL_VER \
    kernel-debug-core-$KERNEL_VER \
    kernel-debug-devel-$KERNEL_VER \
    kernel-debug-devel-matched-$KERNEL_VER \
    kernel-debug-modules-$KERNEL_VER \
    kernel-debug-modules-extra-$KERNEL_VER \
    kernel-debug-modules-internal-$KERNEL_VER \
    kernel-devel-$KERNEL_VER \
    kernel-devel-matched-$KERNEL_VER \
    kernel-modules-$KERNEL_VER \
    kernel-modules-extra-$KERNEL_VER \

If I understand this correctly, you are telling me to check for the kernel devel of my 5.16 right? Well I checked and it exists, are you saying to remove this? I remember getting 2 errors during the point in time I was using make to install it. I won’t delete anything until I can get confirmation this won’t destroy something important, but from what I gather I think this is the driver causing the issue? The args on both kernels are the same, I checked that much as requested.

My bad for the confusions. First of all, my comment above assumed you already successfully booting to Fedora Linux GUI and get them message from gnome-abrt app. If this the case, most likely your system still ok.

About the driver issue, it’s just guessing since the problem comes after tried to install the driver. May be you want to follow the instruction on how to uninstall your driver (it should be available from the source where you get the driver) and try to reinstall it again.

If there errors during the installation, you could post it here. Hopefully some users here can give an idea.

I tried to run the commands from that script individually and I can’t get it to remove a specific version of the kernel, I can only get it to offer the option to remove both, which is not what I want.

Am I going to have to install the kernel from source since the package manager is acting strange or am I overthinking it?

My next line of thinking is that I can remove the @update module and then reinstall it.

I did it! I just removed the 5.16 kernel.core using a splash argument to specify 5.16* and then reinstalled the things it removed, and now here we are, a fully bootable system again.