博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Not enough free disk space on disk '/boot'(转载)
阅读量:5241 次
发布时间:2019-06-14

本文共 3150 字,大约阅读时间需要 10 分钟。

  转自:http://my.oschina.net/u/947673/blog/277224

 

# 解决

出现此情况是因为你的boot分区是单独分区的,像我只给了100M,以前装ubuntu时没有出现,所以当出现这个提示时,很纳闷,发现了.

为什么boot分区会满?

主要是存放了一些老的linux image镜像文件.

SO,

我们想查看我们boot分区有那些linux image,使用命令:

dpkg -l | grep linux-image

我们发现有 linux-image-3.13.0-24-generic,linux-image-3.13.0-27-generic,linux-image-3.13.0-29-generic,这是所有的.

那我们还需要知道系统现在正在使用的是那个image,so,使用命令:

uname -r

我的目前是3.13.0-29-generic,那么小于"29"的都是老的了.

那么我们就去删掉它/它们,

如果你只有一个老的image,则使用

sudo apt-get purge linux-image-x.x.x-xx-generic

如果有多个,像我的一样,那么

一是不断重复sudo apt-get purge linux-image-x.x.x-xx-generic,(当然我可不想这样...)

二是,那就批量了.使用命令:

sudo apt-get purge linux-image-3.13.0-{24,27}-generic

注意,当然不能包括"29"!

OK,至此问题一般都可以解决了.

以下是原文答案的拷贝.

Okay, so from the output of /etc/fstab you posted, it seems that your /boot is mounted on a separate partition, and from the output of df -h, that partition is full. This is because there are some old kernels installed that are not needed; this is evident from the output of dpkg -l | grep linux-image that you posted, where you can see more than one "linux-image" with different versions. We need to remove the old versions. First, I want you to run the command uname -r in a terminal, this will show you the kernel version you are currently using. It will say something like this 3.5.0-26-generic. Take a note of that number, 26! The following commands will assume that that's the kernel you're running.

The command to remove the old kernel versions is:

sudo apt-get purge linux-image-x.x.x-xx-generic

...where the x characters are numbers. So, in your case, we would have to run this command for each of the versions, like sudo apt-get purge linux-image-3.5.0-17-genericsudo apt-get purge linux-image-3.5.0-18-generic, and so on. But, there's a way to do all of this through one command. The command is this:

sudo apt-get purge linux-image-3.5.0-{
17,18,19,21,22,23,24}-generic

DO NOT RUN THE COMMAND YET! Read the following.

This command will remove those versions in the brackets. I've left out versions 3.5.0-25, 3.5.0-26, and 3.5.0-28 because from your dpkg output, your 3.5.0-28 is half configured (from the iF status next to it), so I'm assuming that was the one that your upgrade was trying to upgrade to. So, a guess would say that the current running kernel is 3.5.0-26, that's why I'm not including the number 26 in the brackets. But again, you need to find out what version you're running by uname -rIf the last number from that output is one of the numbers in the brackets above, DO NOT RUN THE COMMAND, and let us know.

But if the last number in uname -r is 26, or 28, or even 25, then it's safe to run the above command (however, if it's 25, remove number 24 from the brackets). Enter your password when prompted, and typey when asked. This will show a bunch of lines, and will eventually go back to matty@matty-G41M-ES2L:~$, hopefully without errors. When it's done, do df -h and look at the last line, the one that starts with /dev/sda1. You should find that it now has more space, and that the percentage used is less than 100% like it was before. You can proceed with your update.

转载于:https://www.cnblogs.com/lance-ehf/p/4012568.html

你可能感兴趣的文章
jquery的$(document).ready()和onload的加载顺序
查看>>
Python Web框架Django (五)
查看>>
.net学习之继承、里氏替换原则LSP、虚方法、多态、抽象类、Equals方法、接口、装箱拆箱、字符串------(转)...
查看>>
【codevs1033】 蚯蚓的游戏问题
查看>>
【程序执行原理】
查看>>
python的多行注释
查看>>
连接Oracle需要jar包和javadoc文档的下载
查看>>
UVA 10976 - Fractions Again?!
查看>>
Dreamweaver cc新版本css单行显示
查看>>
【android】安卓的权限提示及版本相关
查看>>
JavaScript可否多线程? 深入理解JavaScript定时机制
查看>>
IOS基础学习
查看>>
PHP 导出 Excell
查看>>
Java基础教程——网络基础知识
查看>>
Kruskal基础最小生成树
查看>>
ubuntu 14.04 安装搜狗拼音输入法
查看>>
浅谈算法和数据结构: 一 栈和队列
查看>>
Java内部类详解
查看>>
【hdu 1429】胜利大逃亡(续)
查看>>
图论-次短路求法
查看>>