3.15.5 stable kernel not building, "gzip: stdout: no space left on device", /boot is NOT full

29

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)

If you are guessing that /boot is in deep trouble. You are correct. Now, the tricky part is this. Issue a purge; autoremove won't do the trick because the drive no longer has enough space. What do you do next?

  1. If it is a kernel (old one) that needs to be removed, look closely at your grub.conf or grub.cfg configuration and Identify the kernels you no longer need. Check the currently loaded kernel by issuing uname -r.

  2. Take note of the files that needs to be moved, in our example its a debian based system so you will have to move these files: abi, config, initrd.img, System.map, vmcoreinfo, vmlinuz. Just remove/move those that you don't need.

  3. Once done issue the command updatedb to update the slocate database of the filesystem

  4. Now you can issue the upgrade command back and this will install the new kernel correctly.

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

Share:
29

Related videos on Youtube

Boomaa
Author by

Boomaa

Updated on September 18, 2022

Comments

  • Boomaa
    Boomaa over 1 year

    I've been struggling to find an answer to my specific problem here. I understand that I can use regex to separate array values, but they both don't seem to work and I can't figure out how to get the two values separately. Thanks!

    Here's my code without any separation of arr:

    package boomaa;
    
    import java.util.*;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import java.io.*;
    import java.lang.*;
    
    public class Solution{
        public static void main(String[] args) throws FileNotFoundException {
            Scanner sc = new Scanner(new File("A.txt"));
            List<String> lines = new ArrayList<String>();
            while (sc.hasNextLine()) {
              lines.add(sc.nextLine());
            }
    
            String[] arr = lines.toArray(new String[0]);
            System.out.println(Arrays.toString(arr));
            for (int i = 1;i<arr.length;i++) {
                System.out.println(arr[i]);
            }
        }
    }
    

    My input is formatted like this:

    3
    1 CS
    2 CS
    1 SS
    
  • acrognale
    acrognale almost 10 years
    I mentioned in the title that /boot is NOT full. Please see my df -h output for the space available in /boot.
  • Boomaa
    Boomaa about 6 years
    Thanks! However, when I compile this it gives me an error saying that split() can't have ' ' as an argument.
  • Jake Miller
    Jake Miller about 6 years
    @Boomaa Sorry. Used to C# allowing chars as an argument for split. Try double quotes " ".