升级内核时“gzip:stdout:设备上没有剩余空间”
尝试运行下面显示的命令时,我看到以下错误。 我在某处读到我的/ boot分区磁盘空间不足。 如何增加/ boot分区的大小以便安装更多软件? 我有一个500GB的硬盘,所以有足够的空间可以玩。
sudo apt-get install libdvdread4 gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-33-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-33-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-33-generic (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-server: linux-image-server depends on linux-image-3.2.0-33-generic; however: Package linux-image-3.2.0-33-generic is not configured yet. dpkg: error processing linux-image-server (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-server: linux-server depends on linux-image-server (= 3.2.0.33.36); however: Package linux-image-server is not configured yet. dpkg: error processing linux-server (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: linux-image-3.2.0-33-generic linux-image-server linux-server N: Ignoring file 'michael-gruz-canon-precise.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'michael-gruz-canon-precise.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
下面列出的是du
的输出
Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/ubuntu-root 712660664 104095912 572363692 16% / udev 3964792 4 3964788 1% /dev tmpfs 1591012 1064 1589948 1% /run none 5120 0 5120 0% /run/lock none 3977528 684 3976844 1% /run/shm /dev/sda1 233191 219821 929 100% /boot
你有一个单独的/boot
分区,大小只有227MB左右。 这个分区已满。
Ubuntu给你一个单独的/ boot分区的原因似乎是你在驱动器的其余部分使用LVM和/或“全”磁盘加密。
/boot
目录包含所有内核映像,因此可能导致此问题的原因是您安装了太多以前的内核。 Ubuntu发布内核更新,即使对于长期稳定版本,也会频繁地破坏软件包名称中的版本号,因此,如果您使系统保持最新状态,那么随着时间的推移, /boot
目录将会增长。
您应该能够列出已安装的内核
aptitude search ~ilinux-image
(请注意,这可能会返回非内核的包)。
通常不需要安装两个以上的内核 – 当前正在使用的内核和前一个内核(作为后备)。 所以你可以逐个删除旧版本,如下所示:
sudo apt-get autoremove linux-image-3.2.0-23-generic
确保将“3.2.0-23-generic”替换为要删除的实际内核版本! 另外,不要删除linux-image-generic
等软件包。 你必须非常小心,不要删除当前正在运行的内核,否则你将无法启动(Ubuntu可能会或可能不会警告你这样做)。
您可以找到当前运行的内核:
uname -r
这是我刚刚解释过的图解指南。 本文使用略有不同的工具,但基本相同的方法。
我其实想对neon_overload发表评论,但是askubuntu阻止我这样做..
我按照这个过程但是现在的包: linux-image-generic
在我运行后没有出现: aptitude search ~ilinux-image
现在我不知道如何继续 – 我正在运行3.14 kenel:
$ uname -a Linux ***** 3.13.1-031301-generic #201401291035 SMP Wed Jan 29 15:37:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
现在我不知道是否需要安装我能在synaptic包管理器中找到的linux-image-generic
– 3.2或者在3.13版本下安装查找linux-image-generic
我已经解决了这个问题 –
- 使用synaptic包管理器安装:
linux-image-generic
和linux-image
-
按照常规程序安装新内核 – 在3个文件上使用
dpkg -i
:ubuntu-pc:〜/ Downloads / kernel_3.13.1 $ ls linux-headers-3.13.1-031301_3.13.1-031301.201401291035_all.deb linux-headers-3.13.1-031301-generic_3.13.1-031301.201401291035_amd64.deb
Linux的图像3.13.1-031301-generic_3.13.1-031301.201401291035_amd64.deb
现在我的输出中有linux-image-generic
和linux-image
: aptitude search ~ilinux-image
。
现在让我们尝试用手指交叉启动。
- 处理时遇到错误:man-db
- 安装后脚本始终失败时如何强制删除
- “软件包处于非常糟糕的不一致状态 – 您应该在尝试配置之前重新安装它。”
- 错误:在55497包’indicator-displex’附近解析文件’/ var / lib / dpkg / status’
- dpkg:错误:重复文件触发文件名`/ usr / lib / gio / modules’和包`libglib2.0-0:i386’的兴趣
- “gzip:stdout:设备上没有剩余空间”
- dpkg不会更新 – 指标会话中的输入/输出错误
- E:dpkg被打断了…运行’sudo dpkg –configure -a’
- dpkg:error handlingpython-minimal(–configure)