我的系统:
toor@suey:~$ cat /etc/os-release
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2020.4"
VERSION_ID="2020.4"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"
toor@suey:~$ uname -a
Linux suey.nknwn.local 5.9.0-kali1-rt-amd64 #1 SMP PREEMPT_RT Debian 5.9.1-1kali2 (2020-10-29) x86_64 GNU/Linux
toor@suey:~$
我的问题:
toor@suey:~$ sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://download.draios.com/stable/deb stable-amd64/ InRelease
Hit:4 https://artifacts.elastic.co/packages/6.x/apt stable InRelease
Hit:5 https://download.docker.com/linux/debian stretch InRelease
Hit:6 https://packages.microsoft.com/repos/vscode stable InRelease
Hit:8 http://packages.cloud.google.com/apt cloud-sdk-buster InRelease
Hit:7 http://kali.download/kali kali-rolling InRelease
Hit:2 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
Hit:9 https://packagecloud.io/slacktechnologies/slack/debian jessie 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.
Setting up initramfs-tools (0.139) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.139) ...
update-initramfs: Generating /boot/initrd.img-5.9.0-kali2-rt-amd64
W: Possible missing firmware /lib/firmware/i915/rkl_dmc_ver2_01.bin for module i915
pigz: abort: write error on <stdout> (No space left on device)
E: mkinitramfs failure cpio 141 pigz 28
update-initramfs: failed for /boot/initrd.img-5.9.0-kali2-rt-amd64 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)
toor@suey:~$ df -h | grep /boot
/dev/nvme0n1p2 237M 179M 46M 80% /boot
/dev/nvme0n1p1 511M 140K 511M 1% /boot/efi
toor@suey:~$ dpkg --list | grep linux-image
rc linux-image-5.6.0-kali1-amd64 5.6.7-1kali1 amd64 Linux 5.6 for 64-bit PCs
ii linux-image-5.9.0-kali1-rt-amd64 5.9.1-1kali2 amd64 Linux 5.9 for 64-bit PCs, PREEMPT_RT
ii linux-image-5.9.0-kali2-rt-amd64 5.9.6-1kali1 amd64 Linux 5.9 for 64-bit PCs, PREEMPT_RT
ii linux-image-rt-amd64 5.9.6-1kali1 amd64 Linux for 64-bit PCs (meta-package)
toor@suey:~$ uname -a
Linux suey.nknwn.local 5.9.0-kali1-rt-amd64 #1 SMP PREEMPT_RT Debian 5.9.1-1kali2 (2020-10-29) x86_64 GNU/Linux
toor@suey:~$ sudo apt-get autoremove linux-image-5.6.0-kali1-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'linux-image-5.6.0-kali1-amd64' is not installed, so not removed
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.
Setting up initramfs-tools (0.139) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.139) ...
update-initramfs: Generating /boot/initrd.img-5.9.0-kali2-rt-amd64
W: Possible missing firmware /lib/firmware/i915/rkl_dmc_ver2_01.bin for module i915
pigz: abort: write error on <stdout> (No space left on device)
E: mkinitramfs failure cpio 141 pigz 28
update-initramfs: failed for /boot/initrd.img-5.9.0-kali2-rt-amd64 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)
toor@suey:~$
我的问题:如何处理这个问题?
先感谢您!
答案1
您的启动分区已满。通常,这是来自不再需要的旧版本内核。显示当前内核版本。
uname -r
运行以下命令以删除已安装的所有非最新内核的内核。
dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs sudo apt -y purge
sudo apt autoremove