Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I just upgraded from 10.10 to 11.04. During the upgrade process, it said there was a problem setting up initramfs-tools and I needed to do sudo dpkg --configure -a

So once I got 11.04 started for the first time, I did that. This is the output.

Setting up initramfs-tools (0.98.8ubuntu3) ...
update-initramfs: deferring update (trigger activated)
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
Errors were encountered while processing:

After searching around, it seemed like this was a problem of insufficient space in my /boot partition. It is only 100 MB and this has never been a problem before, but despite deleting all but the latest kernel I still get the same message.

share|improve this question

2 Answers 2

100MB is sufficient for 2 kernels and a init ramdisk. You can view your current installed kernels by executing:

dpkg -l 'linux-image-*' | grep '^ii'

Example output:

ii  linux-image-2.6.35-28-generic        2.6.35-28.50                               Linux kernel image for version 2.6.35 on x86/x86_64
ii  linux-image-2.6.38-8-generic         2.6.38-8.42                                Linux kernel image for version 2.6.38 on x86/x86_64
ii  linux-image-generic                                        Generic Linux kernel image

After confirming that the latest kernel works, you can remove the previous ones. In this case, there is only one redundant kernel:

sudo apt-get purge linux-image-2.6.35-28-generic

If this process does not complete because of previous installation triggers, try adding -f (--fix-broken) before purge.

share|improve this answer
On purging each old kernel it gave the same error as I posted above. –  user3403 Apr 29 '11 at 18:24
using -f (force operation) does not help at all. –  Sridhar Ratnakumar Apr 7 '13 at 6:09
-f doesn't mean force anyway –  stew May 22 '13 at 14:06

I'd suggest seeing what is taking up space in /boot/:

find /boot/ -type f | xargs du | sort -n

Then, if you find large consumers of space, you can see which package they're from:

dpkg -S /boot/some-large-file

And if that package is no longer needed, you can remove it. However, be very careful to not remove stuff that you need - particularly the bootloader (grub), and the currently-running kernel.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.