Ubuntu apt upgrade 时报错
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| update-initramfs: Generating /boot/initrd.img-5.4.0-110-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-110-generic with 1. dpkg: error processing package linux-firmware (--configure): installed linux-firmware package post-installation script subprocess returned error exit status 1 Processing triggers for initramfs-tools (0.136ubuntu6.7) ... update-initramfs: Generating /boot/initrd.img-5.4.0-110-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-110-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: linux-firmware initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1)
|
其实是个老问题了,每次 apt upgrade 都会报错,实际就是 /boot 分区分的太小,然后塞不进了就报错
当时参考https://superuser.com/questions/1601194/update-initramfs-error-24-write-error-cannot-write-compressed-block解决
先去 /boot 分区里看下老版本是啥
然后搜下”linux-image” 或者
1
| sudo apt list --installed | grep "5.4.0-109" (这个版本不固定,不要照抄)
|
理论卸掉一个 sudo apt remove linux-image-5.4.0-109-generic
就能一切继续了
你也可以一口气把老的都卸掉