• 0 Posts
  • 10 Comments
Joined 3 years ago
cake
Cake day: November 8th, 2021

help-circle




  • sudo update-initramfs

    Don’t delete any kernels (vmlinuz-*) or initrd images (initrd.img-*), just to ensure nothing bad happens again. And, after updating the initramfs, run sudo update-grub. If you can boot into a livecd, could you post a screenshot of everything in /boot like you did in the original post?


  • That’s not what will happen. Note the version number in my reply. Ubuntu based distros won’t remove old kernels after updating to newer kernels. This is probably what’s taking space in your /boot partition.

    In the screenshot you posted, there are 5 kernels:

    • vmlinuz-5.11.0-40-generic
    • vmlinuz-5.11.0-41-generic
    • vmlinuz-5.11.0-43-generic
    • vmlinuz-5.11.0-44-generic
    • vmlinuz-5.11.0-46-generic

    But there are only three initramfs images:

    • initrd.img-5.11.0-40-generic
    • initrd.img-5.11.0-41-generic
    • initrd.img-5.11.0-43-generic

    It is likely that your boot partition doesn’t have enough space to store the initramfs image for booting kernels 5.11.0-44 and 5.11.0-46. To make enough space, you can remove the old kernels. According to your uname -a output, you are currently running kernel 5.11.0-43. And I assume you have no problem with the current kernel. If that is the case, there is no need for kernel 5.11.0-40 and 5.11.0-41.

    So, you can remove the two kernels. Old kernels are probably not removed by default so that you can boot to the previous kernel if the latest kernel has issues. After doing so, reboot to ensure nothing has gone wrong. Now, try sudo apt upgrade again, which should hopefully install the latest kernel and generate its initrd file. Reboot to the newly installed kernel and try sudo apt autoremove to remove any remaining pacakges as @kromonos@fapsi.be suggested