A couple of weeks ago I've upgraded Ubuntu from 18 to 20 over ssh, the process was interrupted one time because /boot
partition was full (no space left on the device), I freed up the space, restarted the process and finished it. Then the system started to return errors like this, that's usually caused (again) by no space left on the device, but that's not the case anymore, space is enough
apt-get update && apt-get --with-new-pkgs upgrade
Hit:1 http://ch.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://ch.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://ch.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-48-generic
Error 24 : Write error : cannot write compressed block
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.4.0-48-generic 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
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Two weeks ago I've fixed the issue by restarting the system with the previous kernel, manually remove and reinstall the current one (5.4.0-48-generic), restarting again the system with latest kernel.
I could do this again, but since the issue returned it will probably happen again.
Anyone has some more in depth understanding of the issue, that could allow me to fix it one time for all?
Edit: @guiverc
cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
@nobody
# dpkg -l | egrep -v '^ii|rc'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
+++-======================================-=====================================-============-===============================================================================
iF initramfs-tools 0.136ubuntu6.3 all generic modular initramfs generator (automation)
dpkg -l | egrep -v '^ii|rc'
– nobody Oct 30 '20 at 09:18