Kernel Update Headaches

Last week I was doing my monthly updates when I came across a problem with updating an Ubuntu Linux Server. The server was trying to update its Linux kernel and was throwing the same error when attempting to upgrade:


dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-39_3.2.0-39.62_all.deb (--unpack):
 unable to create `/usr/src/linux-headers-3.2.0-39/arch/alpha/include/asm/irqflags.h.dpkg-new' (while processing `./usr/src/linux-headers-3.2.0-39/arch/alpha/include/asm/irqflags.h'): No space left on device
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Selecting previously unselected package linux-headers-3.2.0-39-generic-pae.
Unpacking linux-headers-3.2.0-39-generic-pae (from .../linux-headers-3.2.0-39-generic-pae_3.2.0-39.62_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/linux-headers-3.2.0-39-generic-pae_3.2.0-39.62_i386.deb (--unpack):
 unable to create `/usr/src/linux-headers-3.2.0-39-generic-pae/include/config/dlci.h.dpkg-new' (while processing `./usr/src/linux-headers-3.2.0-39-generic-pae/include/config/dlci.h'): No space left on device
No apport report written because MaxReports is reached already
 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-headers-3.2.0-39_3.2.0-39.62_all.deb
 /var/cache/apt/archives/linux-headers-3.2.0-39-generic-pae_3.2.0-39.62_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

The normal fix of running apt-get -f install would not correct the issue and apt-get purge and apt-get clean didn't help.

After a number of false starts, I finally came across this command to force out the incorrect kernel package and reload:


sudo dpkg --force-remove-reinstreq -r linux-{,image-}generic-pae
sudo apt-get install linux-generic-pae

Comments