"gzip: stdout: No space left on device" while upgrading the kernel

You have a separate partition for /boot that is only around 227MB in size. This partition is full.

The reason Ubuntu has given you a separate parition for /boot seems to be that you are using LVM and/or "full" disk encryption on the rest of the drive.

The /boot directory contains all of your kernel images, so the likely cause of this issue is that you have too many previous kernels installed. Ubuntu issues kernel updates which bump the version number in the package name fairly frequently even for long term stable versions, so over time if you keep the system up to date, the /boot directory will grow.

You should be able to list your installed kernels with

aptitude search ~ilinux-image

(Note that this will probably return packages that aren't kernels, too).

There is usually no need for more than two kernels to be installed - the one currently in use and the previous known working kernel (as a fallback). So you can start removing the older ones, one by one, like this:

sudo apt-get autoremove linux-image-3.2.0-23-generic

Make sure you substitute "3.2.0-23-generic" with the actual kernel version you want to remove! Also, don't remove packages such as linux-image-generic. You have to be really careful not to remove the currently running kernel or you won't be able to boot (Ubuntu may or may not warn you about doing this).

You can find your currently running kernel with:

uname -r

Here's an illustrated guide to doing what I've just explained. This article uses slightly different tools but basically the same approach.

Tags:

Dpkg