/boot空间满了

四步处理

Step 1

查看当前/boot空间使用情况,显示已经使用100% /boot空间

$ df -kh
root@guest-server:/home/lgzhou# df -kh
Filesystem      Size  Used Avail Use% Mounted on
udev             63G     0   63G   0% /dev
tmpfs            13G  379M   13G   3% /run
/dev/sda3       462G  255G  184G  59% /
tmpfs            63G  280K   63G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            63G     0   63G   0% /sys/fs/cgroup
/dev/sda1       180M  173M     0 100% /boot
/dev/sdb1       1.8T  329G  1.4T  19% /data
tmpfs            13G   20K   13G   1% /run/user/108
tmpfs            13G     0   13G   0% /run/user/0
tmpfs            13G   12K   13G   1% /run/user/1010
tmpfs            13G  8.0K   13G   1% /run/user/1002
tmpfs            13G  4.0K   13G   1% /run/user/1013

Step 2

使用uname -a查看自己当前启动的是哪个内核

$ uname -a
Linux guest-server 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Step 3

查看已安装的内核dpkg,后面带deinstall的为已删除的内核,可以忽略

$ dpkg --get-selections |grep linux-image
linux-image-4.15.0-33-generic                   deinstall
linux-image-4.15.0-34-generic                   deinstall
linux-image-4.15.0-36-generic                   deinstall
linux-image-4.15.0-42-generic                   install
linux-image-4.15.0-43-generic                   install
linux-image-4.4.0-137-generic                   install
linux-image-4.4.0-138-generic                   deinstall
linux-image-4.4.0-139-generic                   install
linux-image-4.4.0-140-generic                   install
linux-image-4.4.0-141-generic                   install
linux-image-4.4.0-142-generic                   install
linux-image-extra-4.13.0-36-generic             deinstall
linux-image-extra-4.4.0-137-generic             install
linux-image-extra-4.4.0-138-generic             deinstall
linux-image-extra-4.4.0-139-generic             deinstall
linux-image-extra-4.4.0-140-generic             deinstall
linux-image-extra-4.4.0-141-generic             install
linux-image-extra-4.4.0-142-generic             install
linux-image-generic                             install
linux-image-generic-hwe-16.04                   install

Step 4

运行sudo apt-get remove命令卸载其他内核,为了保险起见,保留最近的一两个版本

你可能感兴趣的:(Linux)