欢迎光临
我们一直在努力

ubuntu更新时报 /boot空间不足的解决方法

ubuntu更新时提示/boot目录空间不足,可以把旧的内核卸载掉,腾出/boot空间

1.首先查看自己使用的内核

@***:~$ uname -a

@*** 2.6.32-34-generic #77-Ubuntu SMP Tue Sep 13 19:39:17 UTC 2011 x86_64 GNU/Linux

2.然后查看自己boot目录,选择需要卸载的版本

nixonli@***:~$ cd /boot
nixonli@***:/boot$ ls -l
总用量 60053
-rw-r–r– 1 root root 646299 2011-04-09 06:26 abi-2.6.32-31-generic
-rw-r–r– 1 root root 646334 2011-04-21 06:38 abi-2.6.32-32-generic
-rw-r–r– 1 root root 646334 2011-07-30 05:52 abi-2.6.32-33-generic
-rw-r–r– 1 root root 646590 2011-09-14 07:26 abi-2.6.32-34-generic
-rw-r–r– 1 root root 110567 2011-04-09 06:26 config-2.6.32-31-generic
-rw-r–r– 1 root root 110578 2011-04-21 06:38 config-2.6.32-32-generic
-rw-r–r– 1 root root 110578 2011-07-30 05:52 config-2.6.32-33-generic
-rw-r–r– 1 root root 110578 2011-09-14 07:26 config-2.6.32-34-generic
drwxr-xr-x 3 root root 6144 2011-09-30 08:29 grub
-rw-r–r– 1 root root 8342172 2011-05-03 09:40 initrd.img-2.6.32-31-generic
-rw-r–r– 1 root root 8341449 2011-06-08 08:16 initrd.img-2.6.32-32-generic
-rw-r–r– 1 root root 8373069 2011-08-11 08:45 initrd.img-2.6.32-33-generic
-rw-r–r– 1 root root 8374070 2011-09-30 08:29 initrd.img-2.6.32-34-generic
drwx—— 2 root root 12288 2010-08-20 09:59 lost+found
-rw-r–r– 1 root root 160280 2010-03-23 17:40 memtest86+.bin
-rw-r–r– 1 root root 2158030 2011-04-09 06:26 System.map-2.6.32-31-generic
-rw-r–r– 1 root root 2156642 2011-04-21 06:38 System.map-2.6.32-32-generic
-rw-r–r– 1 root root 2156784 2011-07-30 05:52 System.map-2.6.32-33-generic
-rw-r–r– 1 root root 2157354 2011-09-14 07:26 System.map-2.6.32-34-generic
-rw-r–r– 1 root root 1336 2011-04-09 06:32 vmcoreinfo-2.6.32-31-generic
-rw-r–r– 1 root root 1336 2011-04-21 06:39 vmcoreinfo-2.6.32-32-generic
-rw-r–r– 1 root root 1336 2011-07-30 05:53 vmcoreinfo-2.6.32-33-generic
-rw-r–r– 1 root root 1336 2011-09-14 07:29 vmcoreinfo-2.6.32-34-generic
-rw-r–r– 1 root root 4055840 2011-04-09 06:26 vmlinuz-2.6.32-31-generic
-rw-r–r– 1 root root 4049376 2011-04-21 06:38 vmlinuz-2.6.32-32-generic
-rw-r–r– 1 root root 4051264 2011-07-30 05:52 vmlinuz-2.6.32-33-generic
-rw-r–r– 1 root root 4053696 2011-09-14 07:26 vmlinuz-2.6.32-34-generic

3.卸载旧内核应该使用命令:

nixonli@***:/boot$ sudo apt-get remove linux-image-2.6.32-31-generic
nixonli@***:/boot$ sudo apt-get remove linux-image-2.6.32-32-generic

4.查看/boot目录:

nixonli@***:/boot$ sudo du -m /boot //以MB为单位显示
1 /boot/grub/locale
5 /boot/grub
1 /boot/lost+found
34 /boot

5.查看文件系统使用情况,和文件系统被挂在的位置:

nixonli@***:/boot$ df -lh
文件系统 容量 已用 可用 已用%% 挂载点
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda3 74G 9.2G 61G 14% /
none 2.0G 264K 2.0G 1% /dev
none 2.0G 1.5M 2.0G 1% /dev/shm
none 2.0G 144K 2.0G 1% /var/run
none 2.0G 0 2.0G 0% /var/lock
none 2.0G 0 2.0G 0% /lib/init/rw
/dev/sda1 92M 39M 48M 46% /boot
/dev/sda4 382G 195G 168G 54% /home

reboot电脑便可以更新

窗外天空
关注公众号『窗外天空』

获取更多建站运营运维新知!
互联网创业、前沿技术......

赞(0) 打赏
文章名称:《ubuntu更新时报 /boot空间不足的解决方法》
文章链接:https://www.nixonli.com/69.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏