0

I deleted some old kernel files from the boot partition, to try and free up some space, only to find out 5 minutes later that I should have used janitor or other appropriate program.

Now I get the error "disk full" or "gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.13.0-61-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-3.13.0-61-generic (--configure):" whenever I try installing something or fixing the problem.

I already tried this: Deleted old version of kernel to free up space - now getting nonstop errors but to no avail. The command "sudo apt-get --reinstall install linux-image-extra-3.13.0-61-generic" gives me the error "Internal Error, No file name for linux-image-extra-3.13.0-61-generic:i386", and the command "sudo touch linux-image-extra-3.13.0-61-generic" followed by "sudo apt-get purge" gives me the error "gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.13.0-61-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-3.13.0-61-generic (--configure):"

My boot partition has a total of 236M and 0M free.

Here is my 'df -h' result:

Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/lubuntu--vg-root  145G   38G  100G  28% /
none                          4,0K     0  4,0K   0% /sys/fs/cgroup
udev                          998M  8,0K  998M   1% /dev
tmpfs                         202M  2,1M  200M   1% /run
none                          5,0M     0  5,0M   0% /run/lock
none                         1008M   47M  962M   5% /run/shm
none                          100M   32K  100M   1% /run/user
/dev/sda5                     587G  361G  197G  65% /mnt/shared
/dev/sdb1                     236M  236M     0 100% /boot
/dev/sdg1                     459G  224G  212G  52% /media/pipanni/121db010-bcaa-46c3-ac6c-65059345271d

Here's the result from the "du -sk *|sort -n" command:

0   linux-image-extra-3.13.0-61-generic
12  lost+found
167 config-3.13.0-61-generic
174 memtest86+.bin
175 memtest86+.elf
176 memtest86+_multiboot.bin
1148    abi-3.13.0-61-generic
2650    System.map-3.13.0-61-generic
5731    vmlinuz-3.13.0-61-generic
6968    grub
19191   initrd.img-3.13.0-61-generic

What else can I try?

1
  • This is when you are very glad you have an image backup of your boot drive so you can revert. I use a drive cloner device and make sure to clone my boot drive before making any changes like this.
    – SDsolar
    Mar 5, 2018 at 20:34

2 Answers 2

0

Find your current running kernel with:

uname -r 

Then delete any vmlinuz/initrd kernel & image files from boot provided they are not the running kernel. I suggest you create a copy of the running kernel somewhere first just in case you make a mistake.

You can remove old kernels several ways. Just deleting them (not recommended).

Use a tool: How do I remove old kernel versions to clean up the boot menu?

Or manually remove with package manager: https://help.ubuntu.com/community/Lubuntu/Documentation/RemoveOldKernels


Also to identify what is taking up all the space. From a shell type the following commands and post the output. Also what filesystem type is /boot I presume ext4?

cd /boot
du -sk *|sort -n
7
  • Hi, thanks for replying. Ubuntu Tweak (Janitor) tells me "your system is clean" and running "dpkg -l | grep linux-image-" shows only my current kernel. Yet my boot partition still has zero free space. What can I try next? :P Aug 27, 2015 at 16:39
  • Can you run "df -h" and add the output to your question?
    – hookenz
    Aug 27, 2015 at 21:14
  • Done! I have added the output to my question. :) Aug 28, 2015 at 9:45
  • How did you delete the files?
    – hookenz
    Aug 28, 2015 at 13:56
  • I used a terminal and deleted the old kernels that I could see in the boot partition (after doing an "ls" command). That didn't do anything to the free space available, and then I found out that I should have used janitor or synapse. But it was too late. (the trash folder is empty, by the way) Aug 29, 2015 at 14:19
0

I finally found out how to solve this:

There was a trash folder inside the "boot" partition taking up all the space. You need to log on as root to be able to see and delete the files inside that trash folder, by clicking Shift+Delete, otherwise the files will just come back into existence after one second, in the exact same folder.

Voilá! :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .