I encountered the same issue recently with a kernel panic after an upgrade.
What I'm using:
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Solution:
Reboot the computer and select a previous kernel version from the GRUB menu to boot into.
After successfully booting into the previous kernel, run the following command to check the installed kernel versions:
dpkg --list | grep linux-image
In my case, I found the following entry with an incomplete installation status (iU):
iU linux-image-5.10.0-33-amd64 5.10.226-1 amd64 Linux 5.10 for 64-bit PCs (signed)
- Fix the incomplete installation by running:
sudo apt --fix-broken install
- Rebuild the initramfs for the new kernel version:
sudo update-initramfs -u -k 5.10.0-33-amd64
- Update GRUB to ensure the bootloader is aware of the changes:
sudo update-grub
- Reboot the system to boot into the newly fixed kernel:
sudo reboot
After following these steps, my system booted successfully with the newer kernel, and the kernel panic issue was resolved.
I hope it will help someone.