My issue
As regularly, I ran apt update and apt upgrade on my computer (with elevated privileges). But this time, the upgrade failed. It reported some error in the post-install script of initramfs-tools.
The problem
Turns out, my boot partition was nearly full. Runnig df -h reported the mount on /boot to use 91%. Not too surprising, with a partition that is only 500mb large. But hey, Debian told me that this is the right amount, and who am I to argue with that?
Hopping to /boot showed me the problem quite fast: I had three versions of the Linux kernel installed. For every kernel, there are the following files 1:
config-x.y.z+deb13-amd64initrd.img-x.y.z+deb13-amd64System.map-x.y.z+deb13-amd64vmlinuz-x.y.z-deb13-adm64
The fix
- Run
apt list --installed | grep linux-image. You will most probably find one package for each installed kernel. - Run
uname -ato find out which kernel you are currently running on. You do not want to remove this one! - Find kernels that want to be removed, and
apt remove linux-image-x.y.z+deb13-amd64them. - Done!
I kept two kernel versions installed: The one I am currently running, and the one I am going to run on the next reboot (the error occurred when installing a new kernel, hence I am currently not living on the latest kernel).
Note that I am on Debian 13 and running an AMD64 system. The files might be named differently for you. ↩︎