1

Spare me as this is the first question I ever post in here.

So I tried to update on Ubuntu 22.04 using the command line and everything was fine until I got the error E: Sub-process /usr/bin/dpkg returned an error code (1)

Here:

Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-27-lowlatency
I: The initramfs will attempt to resume from /dev/sda1
I: (UUID=d0783d7d-a3db-4dbb-a784-8b92c1aa4355)
I: Set the RESUME variable to override this.
zstd: error 25 : Write error : No space left on device (cannot write compressed block)
E: mkinitramfs failure zstd -q -1 -T0 25 update-initramfs: failed for /boot/initrd.img-5.15.0-27-lowlatency 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) <

So, I really have no what is going on. The boot partition still has space in it and as far as I can see I can't install anything after I sudo apt update and then tried the sudo apt upgrade.

It is only recently that I started using Linux and just began using Lubuntu 22.04.

Thanks in advance

2 Answers2

1

It may be the case your /boot directory doesn't have enough space, although not full, because of old kernels. Please, try deleting old packages:

sudo apt autoremove

I had this problem and it solved for me. This thread on the Ubuntu Forums dealt with a similar issue, if not the same.

lucasresck
  • 33
  • 7
  • This was the case for me after upgrading from Ubuntu 20.04LTS to 22.04LTS: Although I only had 2 kernels there, the `/boot` partition was quite small, so not enough for 3 kernels (on my system 22.04LTS has significantly larger `initrd` files). Running `apt upgrade` or `apt-get upgrade` when the `initrd` file needed to be rebuilt (from earlier failed runs) was trying to create - temporarily - an additional `initrd` file which would later replace one of the existing `initrd` files. My quick fix was to move the not-in-use `initrd` file to (say) `/root`, perform the upgrade, then move it back. – Andrew Richards Sep 13 '22 at 17:54
0

The magic command is:

zfs list -t snapshot -r  | grep auto | cut -f1 -d' ' | xargs -n 1 sudo zfs destroy

from Out of space on boot zpool and cant run updates anymore Ubuntu REALLY needs to fix this stuff.

Ciro Santilli OurBigBook.com
  • 26,663
  • 14
  • 108
  • 107