DO NOT REBOOT! FIX THE PROBLEM IMMEDIATELY!

if this problem is on a device that has been shutdown or does not reboot, it might be necessary:

  1. to create a bootable stick (preferably similar OS than installed)
  2. to unlock the encrypted partitions first
hostnamectl; # tested on
         Icon name: computer-desktop
           Chassis: desktop
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-16-amd64
      Architecture: x86-64

this simply means: no space left on /boot device (too many old kernels there)

the /boot partition is currently per default only 256MBytes small and fills up fast, when there are no removal of old kernels.

# the error message continues like this
E: mkinitramfs failure cpio 141 pigz 28
update-initramfs: failed for /boot/initrd.img-4.19.0-16-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

what to do?

# tidy up /boot
su - root
apt autoremove

what kernels are installed?

  • yes with GNU Linux the user can have multiple kernel versions installed
  • they install during update automatically
  • older versions are kept, in case the new kernel breaks something
    • so the user can select an older kernel during boot (up to now was only forced to do this once)
hostnamectl; # show currently used kernel (IF IT WORKS WELL, KEEP THIS KERNEL!)
         Icon name: computer-desktop
           Chassis: desktop
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-16-amd64
      Architecture: x86-64

# show installed kernels:
dpkg -l | grep linux-image | awk '{print$2}'
linux-image-4.19.0-11-amd64
linux-image-4.19.0-13-amd64
linux-image-4.19.0-16-amd64
linux-image-amd64

# remove the unused kernels
# to free space on /boot
apt remove --purge linux-image-4.19.0-13-amd64
apt remove --purge linux-image-4.19.0-11-amd64

# show disk space usage 
df -h|grep boot
/dev/sda2                        237M  190M   35M  85% /boot
/dev/sda1                        511M   13M  499M   3% /boot/efi

then try upgrade again

update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.19.0-16-amd64
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8107e-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8107e-1.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168h-2.fw for module r8169
...

update-grub2
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-4.19.0-16-amd64
Found initrd image: /boot/initrd.img-4.19.0-16-amd64
Found linux image: /boot/vmlinuz-4.19.0-14-amd64
Found initrd image: /boot/initrd.img-4.19.0-14-amd64
done

# close all programs & cross fingers
reboot

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin