跳转至

Ubuntu 提示boot分区空间不足


2015-03-09 by dongnan

问题描述

升级 ubuntu 14.04.1 后,提示/boot 分区空间不足。

环境

操作系统: Ubuntu 14.04.1

磁盘空间

df -Th

Filesystem                  Type      Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root ext4      114G   36G   72G  33% /
none                        tmpfs     4.0K     0  4.0K   0% /sys/fs/cgroup
udev                        devtmpfs  1.9G  4.0K  1.9G   1% /dev
tmpfs                       tmpfs     391M  1.3M  390M   1% /run
none                        tmpfs     5.0M     0  5.0M   0% /run/lock
none                        tmpfs     2.0G   80K  2.0G   1% /run/shm
none                        tmpfs     100M   52K  100M   1% /run/user
/dev/sda1                   ext2      236M  185M   39M  83% /boot

注意,boot 分区可用空间确实不足,因为之前升级过几次。

解决方法

删除掉旧的文件,释放一些空间(新装系统划分/boot分区分配的大一些)。

当前内核版本

uname -r
3.13.0-43-generic

已安装的内核

dpkg --get-selections |grep linux-image
linux-image-3.13.0-24-generic            install
linux-image-3.13.0-35-generic            install
linux-image-3.13.0-36-generic            install
linux-image-3.13.0-37-generic            install
linux-image-3.13.0-40-generic            install
linux-image-3.13.0-43-generic            install
linux-image-extra-3.13.0-24-generic        install
linux-image-extra-3.13.0-35-generic        install
linux-image-extra-3.13.0-36-generic        install
linux-image-extra-3.13.0-37-generic        install
linux-image-extra-3.13.0-40-generic        install
linux-image-extra-3.13.0-43-generic        install
linux-image-generic                install

卸载旧版本内核

aptitude remove linux-image-3.13.0-24-generic

The following packages will be REMOVED:  
  linux-image-3.13.0-24-generic
0 packages upgraded, 0 newly installed, 1 to remove and 139 not upgraded.
Need to get 0 B of archives. After unpacking 41.6 MB will be freed.
The following packages have unmet dependencies:
 linux-image-extra-3.13.0-24-generic : Depends: linux-image-3.13.0-24-generic but it is not going to be installed.
The following actions will resolve these dependencies:

     Remove the following packages:      
1)     linux-image-extra-3.13.0-24-generic

Accept this solution? [Y/n/q/?] y   # 输入 y
The following packages will be REMOVED:
  linux-image-3.13.0-24-generic linux-image-extra-3.13.0-24-generic{a}
0 packages upgraded, 0 newly installed, 2 to remove and 139 not upgraded.
Need to get 0 B of archives. After unpacking 193 MB will be freed.
Do you want to continue? [Y/n/?] y  # 输入 y
回到页面顶部