/boot 大小太小?无法自动删除和清理内核

/boot 大小太小?无法自动删除和清理内核

我尝试apt-get upgrade,但出现错误:

update-initramfs: Generating /boot/initrd.img-4.4.0-179-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-179-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu11.2) ...
Errors were encountered while processing:
 linux-firmware
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

我试过autoremove

$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.122ubuntu8.16) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.157.23) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-179-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-179-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for initramfs-tools (0.122ubuntu8.16) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-179-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-179-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script 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)

df -h

Filesystem              Size  Used 

Avail Use% Mounted on
udev                    7.8G     0  7.8G   0% /dev
tmpfs                   1.6G  170M  1.4G  11% /run
/dev/sda2               234G  7.6G  214G   4% /
tmpfs                   7.9G   44M  7.8G   1% /dev/shm
tmpfs                   5.0M     0  5.0M   0% /run/lock
tmpfs                   7.9G     0  7.9G   0% /sys/fs/cgroup
tmpfs                   1.6G   16K  1.6G   1% /run/user/1000
/dev/sda1               189M  161M   15M  92% /boot

也许 190 MB 太小了?我该如何增加容量?(这是一台远程服务器,我无法使用实时 USB。)

或许还有其他解决方案?

相关内容