Ubuntu 12.04 LTS och HWE

Ubuntu 12.04 LTS got something called the Hardware Enablement Stacks (HWE), to support newer hardware. A LTS release is supported for 5 years. There are different versions of the HWE, where only some is supported for the full LTS lifetime. More info here:
HWE End-of-life

To make this story short. I want to remain on 12.04 LTS, so I decided to upgrade the HWE. However, the upgrade failed due to a full /boot, leading to clean-up efforts. Therefor, make sure to check your disk before starting the HWE upgrade:

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/xyz-root 40G 28G 9,7G 75% /
udev 2,0G 4,0K 2,0G 1% /dev
tmpfs 396M 304K 396M 1% /run
none 5,0M 0 5,0M 0% /run/lock
none 2,0G 0 2,0G 0% /run/shm
/dev/vda1 228M 210M 5,9M 98% /boot

That is not enough space.

Run the following to identify old kernels to remove:
$ dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'

I found e.g. that I had a 3.5.0-42 kernel that I could remove:

$ sudo apt-get purge linux-image-3.5.0-42-generic linux-headers-3.5.0-42 linux-headers-3.5.0-42-generic

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/xyz-root 40G 27G 11G 73% /
udev 2,0G 12K 2,0G 1% /dev
tmpfs 396M 308K 396M 1% /run
none 5,0M 0 5,0M 0% /run/lock
none 2,0G 0 2,0G 0% /run/shm
/dev/vda1 228M 151M 65M 70% /boot

Enough space so lets upgrade:

sudo apt-get install linux-generic-lts-trusty linux-image-generic-lts-trusty

Reboot and get the greeting “Your Hardware Enablement Stack (HWE) is supported until April 2017.”

Print Friendly, PDF & Email
This entry was posted in Okategoriserade. Bookmark the permalink.