3.15.5 稳定内核未构建,“gzip:stdout:设备上没有剩余空间”,/boot 未满

3.15.5 稳定内核未构建,“gzip:stdout:设备上没有剩余空间”,/boot 未满

Running into an issue building the 3.15.5 stable kernel on Ubuntu 14.04 LTS.

Relevant portion of sudo make modules_install install

  INSTALL /lib/firmware/edgeport/down2.fw
  INSTALL /lib/firmware/edgeport/down3.bin
  INSTALL /lib/firmware/whiteheat_loader.fw
  INSTALL /lib/firmware/whiteheat.fw
  INSTALL /lib/firmware/keyspan_pda/keyspan_pda.fw
  INSTALL /lib/firmware/keyspan_pda/xircom_pgs.fw
  INSTALL /lib/firmware/cpia2/stv0672_vp4.bin
  INSTALL /lib/firmware/yam/1200.bin
  INSTALL /lib/firmware/yam/9600.bin
  DEPMOD  3.15.5
sh /home/anthony/code/linux-stable/arch/x86/boot/install.sh 3.15.5 arch/x86/boot/bzImage \
                System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.15.5 /boot/vmlinuz-3.15.5
run-parts: executing /etc/kernel/postinst.d/dkms 3.15.5 /boot/vmlinuz-3.15.5
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.15.5 /boot/vmlinuz-3.15.5
update-initramfs: Generating /boot/initrd.img-3.15.5

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.15.5 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
make[1]: *** [install] Error 1
make: *** [install] Error 2

Output of df -h

Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root  103G   92G  5.1G  95% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
udev                         3.8G   12K  3.8G   1% /dev
tmpfs                        767M  1.5M  766M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         3.8G   38M  3.8G   1% /run/shm
none                         100M   56K  100M   1% /run/user
/dev/sda1                    228M   55M  161M  26% /boot
/home/anthony/.Private       103G   92G  5.1G  95% /home/anthony
/dev/sdb2                    451G  166G  286G  37% /media/anthony/Windows7_OS

Made a gist of my kernel config: https://gist.github.com/acrognale/7d5568bec6c88cebcde0

EDIT: Fixed it. Turns out it was my tmp directory that was filling up. So, if anyone runs into this in the future, check to make sure that you have enough space on /tmp.

答案1

It appears that you are running out of space somewhere:

Based on your df -h /tmp is a likely location.

Open a second terminal and monitor memory while you are compiling. You can accomplish this with watch cat /proc/meminfo You may have insufficient RAM and/or SWAP to accomplish your task.

You may also have insufficient space on /tmp. Monitor disk usage of the necessary filesystems during compile. You can use the watch command for this as well watch df -h this should allow you to see if something is filling up that you don't expect.

For more details on the watch command (which defaults to a 2 second interval) see man watch

If you have insufficient space on /boot.

Error during kernel upgrade: gzip: stdout: No space left on device

There are times when you will be surprised that package managers do not automatically remove older archives of the software installed. This happened to me for the first time, when one of the systems I was managing suddenly returned an exit status 1.

Removing the offensive application to free up much needed space is sure to fail! especially if the application mentioned here is a kernel.

Consider this line:

Setting up libcups2 (1.4.6-5ubuntu1.3) ...
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-2.6.38-10-generic; however:
Package linux-image-2.6.38-10-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up linux-headers-2.6.38-10 (2.6.38-10.46) ...
Setting up linux-headers-2.6.38-10-generic (2.6.38-10.46) ...
Setting up linux-headers-generic (2.6.38.10.25) ...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.38-8-generic
     gzip: stdout: No space left on device
     E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-2.6.38-8-generic
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
     linux-image-2.6.38-10-generic
     linux-image-generic
     linux-generic
     initramfs-tools

E: Sub-process /usr/bin/dpkg returned an error code (1)

如果您猜测 /boot 陷入了困境。您说对了。现在,棘手的部分是这样的。发出清除命令;自动删除不起作用,因为驱动器不再有足够的空间。您接下来要做什么?

  1. 如果需要删除内核(旧内核),请仔细查看 grub.conf 或 grub.cfg 配置并确定不再需要的内核。通过发出 uname -r 检查当前加载的内核。

  2. 记下需要移动的文件,在我们的示例中,它是一个基于 debian 的系统,因此您必须移动这些文件:abi、config、initrd.img、System.map、vmcoreinfo、vmlinuz。只需删除/移动那些您不需要的文件即可。

  3. 完成后,发出命令 updatedb 来更新文件系统的 slocate 数据库

  4. 现在您可以重新发出升级命令,这将正确安装新内核。

来源:http://myopensourcestints.blogspot.com/2011/07/error-during-upgrade-gzip-stdout-no.html

答案2

OP 回答了这个问题在编辑中

已修复。原来是我的 tmp 目录满了。所以,如果以后有人遇到这种情况,请检查以确保 /tmp 上有足够的空间。

安东尼·克罗格纳尔

相关内容