Hello everyone,
A common problem that we fear of happening after an update are Kernel panics.
This message indicates us that the kernel could not find or mount the root filesystem in our system. In many cases this happens due to a critical component for the kernel, usually the initramfs of the new installed kernel.
The initramfs is essential since it has the necessary modules and drivers for the kernel to mount its root filesystem on boot. If the kernel cannot find the modules, a kernel panic occurs, preventing booting.
Solution
The way to fix this is to regenerate the initramfs image for the kernel that causes kernel panics and then update GRUB.
We will give steps to fix this issue:
- Access GRUB
Press ESC when the BIOS logo appears.
- Select another kernel:
In the "Advanced Options" section, you will see a list of installed kernels. Select an older kernel version.
- Regenerate initramfs for the kernel that causes kernel panics:
Open a terminal and write these commands:
| sudo update-initramfs -u -k <kernel_version> |
Example: sudo update-initramfs -u -k 6.17.0-1012-oem
- Update GRUB:
| sudo update-grub |
- Reboot:
| sudo reboot |