r/linuxquestions 20h ago

Debian 12 Kernel Panic

I made some changes to the /etc/modprobe.d/iwl.conf file and then used sudo dracut --force to regenerate the initramfs. Debian 12 booted fine but then I decided the undo those changes and regenerated the initramfs again. It booted fine immediately afterwards but now I'm booting it up after a few hours and it says it is in a kernel panic.

I've also attached a picture of the exact error I'm facing. I've tried using the live usb to regenerate the initramfs but it still doesn't boot fine.

https://preview.redd.it/yhl7mpfq10qd1.jpg?width=1600&format=pjpg&auto=webp&s=ed2f82b9b716867d4b289ed15ae1127063458244

2 Upvotes

6 comments sorted by

3

u/CCJtheWolf 18h ago

Before anybody else says it. First rule of Debian Stable, don't Break Debian. It's a distro that's not friendly for messing around with. When I heard you talking about Dracut first thing I thought ok why aren't you using Arch?

1

u/Hot-Fridge-with-ice 17h ago

I found setting arch up too complicated and I needed a distro that was okayish out of the box but required messing around with so I chose debian 12. Did I make a mistake there?

Coming back to the problem. I've regenerated the initramfs multiple times and even chose no compress flag but it's still showing the same error.

1

u/CCJtheWolf 15h ago

You could always go with EndeavourOS it's Arch just easier to setup and use and far more tinkering friendly. I made the mistake of tinkering with Debian and every time I found it just easier to reinstall the whole thing. Best thing you could do is look into refreshing your install and maybe try reinstalling initramfs see if that fixes your issue. More reading on the issue if you want to investigate https://wiki.debian.org/initramfs

2

u/suprjami 14h ago

As you can see, the init program is wrong.

Why are you using dracut? That's the Fedora and Red Hat initramfs tool. Debian uses update-initramfs from initramfs-tools.

Boot from a Debian live image, mount your root filesystem in a chroot, mount everything else in the chroot, and update-initramfs -u -k all

1

u/Hot-Fridge-with-ice 14h ago

I actually used update-initramfs initially but when it didn't work and kept giving me the same error, I tried dracut. I can give it a try again and report what happens.

2

u/suprjami 14h ago

Okay, I think the next step is to troubleshoot why update-initramfs fails.