当我在 Ubunutu 22.04 中运行软件更新程序时,它显示 /boot 中的磁盘空间不足错误,并且无法更新。当我运行 sudo apt upgrade(在 sudo apt update 之后)时,我收到可能缺少固件、写入错误和处理包错误的警告。我检查了这些固件文件是否丢失,但它们位于该目录中。
我查看了 askubuntu 上的其他答案,我发现最常见的原因是安装了很多内核,而我只安装了三个(包括正在使用的那个)。我按照以下答案操作在此 askubuntu 页面上并尝试使用sudo apt autoremove
,结果与 相同sudo apt upgrade
。我还尝试安装 ubuntu-tweaks,但它指出它没有发布文件并且无法找到包(添加存储库后)。
我不想删除其他内核,因为我以前遇到过一个问题,当时我的系统在更新后无法使用最新内核启动,但可以使用较旧的内核。我还使用 LUKS 加密硬盘,因此据我所知,我需要一个单独的启动分区。我的 /boot 分区大小为 500mb,根据磁盘显示有 25mb 可用空间,但系统更新程序在错误中显示有 0 个字节可用。
有人能推荐解决这个问题的最佳方法吗?我是否必须删除其他内核,或者我可以安全地调整启动分区的大小?
升级的输出、自动删除命令和安装的内核列表如下,当前正在使用 5.15.0-37-generic。
sudo apt upgrade 输出
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 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 linux-firmware (20220329.git681281e4-0ubuntu3.2) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-37-generic
W: Possible missing firmware /lib/firmware/amdgpu/yellow_carp_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
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-37-generic with 1.
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.15.0-37-generic (5.15.0-37.39) ...
Processing triggers for linux-image-5.15.0-37-generic (5.15.0-37.39) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.15.0-37-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-37-generic
W: Possible missing firmware /lib/firmware/amdgpu/yellow_carp_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
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-37-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.15.0-37-generic (--configure):
installed linux-image-5.15.0-37-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-firmware
linux-image-5.15.0-37-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
dpkg -l linux-image-* | grep ^ii 输出
ii linux-image-5.15.0-27-generic 5.15.0-27.28 amd64 Signed kernel image generic
ii linux-image-5.15.0-33-generic 5.15.0-33.34 amd64 Signed kernel image generic
ii linux-image-generic-hwe-22.04 5.15.0.37.39 amd64 Generic Linux kernel image
sudo apt autoremove 输出
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-firmware (20220329.git681281e4-0ubuntu3.2) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-37-generic
W: Possible missing firmware /lib/firmware/amdgpu/yellow_carp_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
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-37-generic with 1.
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.15.0-37-generic (5.15.0-37.39) ...
Processing triggers for linux-image-5.15.0-37-generic (5.15.0-37.39) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.15.0-37-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-37-generic
W: Possible missing firmware /lib/firmware/amdgpu/yellow_carp_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vangogh_gpu_info.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_rlc.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec2.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_mec.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_me.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_pfp.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_ce.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma1.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/cyan_skillfish_sdma.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/sienna_cichlid_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
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-37-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.15.0-37-generic (--configure):
installed linux-image-5.15.0-37-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-firmware
linux-image-5.15.0-37-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
lsblk -e 7 -o name,fstype,size,fsused,label,partlabel,mountpoint,uuid 的输出
NAME FSTYPE SIZE FSUSED LABEL PARTLABEL MOUNTPOINT UUID
sda 931.5G
├─sda1
│ 16M Microsoft reserved partition
│
├─sda2
│ 466.6G
├─sda3
│ vfat 512M EFI System Partition
│ 79FC-D483
├─sda4
│ crypto 464G d64463f7-a3f2-4e6d-aa20-24502db38777
│ └─sda4_crypt
│ ext4 463.9G 37.8G / 5adad8d4-88aa-48ef-a789-9b042a566764
└─sda5
ext4 476.7M 261.9M /boot fe57f9a0-e2fe-4330-96c5-0be9299de1cc