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?

  • 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 05 '18 at 20:34

2 Answers2

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
hookenz
  • 2,579
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á! :)