• 解决Ubuntu 16.04下提示boot分区空间不足的办法


    原文地址: http://www.jb51.net/article/106976.htm   https://www.linuxidc.com/Linux/2015-09/123227.htm

    因为linux内核一直在更新,更新后,旧的内核就不在使用,但旧的内核文件还在boot里面,占据着空间,更新几次过后boot分区就会被占满,显示boot磁盘空间不足。
    
    解决办法:
    将不用的内核文件删除,释放空间。
    
    步骤如下
    一、查看已安装的内核dpkg --get-selections |grep linux-image
    
    eason@eason:~$ dpkg --get-selections |grep linux-image
    linux-image-4.4.0-21-generic deinstall
    linux-image-4.4.0-57-generic install
    linux-image-4.4.0-59-generic install
    linux-image-4.4.0-62-generic install
    linux-image-4.4.0-64-generic install
    linux-image-extra-4.4.0-21-generic deinstall
    linux-image-extra-4.4.0-57-generic install
    linux-image-extra-4.4.0-59-generic install
    linux-image-extra-4.4.0-62-generic install
    linux-image-extra-4.4.0-64-generic install
    linux-image-extra-virtual install
    linux-image-generic install
    eason@eason:~$
    
    后面带deinstall的为已删除的内核,可以忽略
    
    二、使用uname -a查看自己当前启动的是哪个内核
    eason@eason:~$ uname -a
    Linux eason 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    从输出可知我们当前启动的内核是4.4.0-62-generic
    
    三、运行apt-get remove命令卸载其他内核,为了保险起见,保留最近的一两个版本。在删除旧内核之前,记住最好留有2个最近的内核(最新的和上一个版本),以防主要的版本出错。现在就让我们看看如何在Ubuntu上清理旧内核。
    
    sudo apt-get remove linux-image-4.4.0-57-generic
    sudo apt-get remove linux-image-4.4.0-59-generic
    sudo apt-get remove linux-image-extra-4.4.0-57-generic
    sudo apt-get remove linux-image-extra-4.4.0-59-generic
    如提示有未卸载干净的可以执行sudo apt-get remove来卸载。
    
    或者如果有很多没用的内核,你可以用shell表达式来一次性地删除多个内核。注意这个括号表达式只在bash或者兼容的shell中才有效。
    
    $ sudoapt-get purge linux-image-3.19.0-{18,20,21,25}
    $ sudoapt-get purge linux-headers-3.19.0-{18,20,21,25}
    
    
  • 相关阅读:
    加油 ^_^
    ES6 小记
    Angular2 初学小记
    Round 4
    react中iconfont字体图标不显示问题
    react 实现组件嵌套以及子组件与父组件之间的通信
    wamp&花生壳 在本地搭建自己的网站
    深入浅出CSS(二):关于雪碧图、background-position与steps函数的三角恋情
    深入浅出CSS(一):line-height与vertical-align的性质
    十进制字符编号
  • 原文地址:https://www.cnblogs.com/nyist-xsk/p/8534251.html
Copyright © 2020-2023  润新知