Little T in the Cog linux

Archive for April 2016

Upgrading Ubuntu 14.04 to 16.04


I've just upgraded my first Ubuntu 14.04 box to 16.04. I could have waited around 3 months for Canonical to push it into the update channel and then simply run "do-release-upgrade" but it is easy enough to do manually so thought I'd give it a whirl.

If you want to try this yourself you need to change all instances of "trusty" to "xenial" in /etc/apt/sources.list, eg:

deb xenial main restricted 
deb-src xenial main restricted 

Then run "apt-get update && apt-get upgrade". Once it has completed installing the new packages, reboot the box and log back in, then run "apt-get distupgrade". Once those packages are installed (including the new kernel) reboot again. You're now running 16.04!

The machine I picked to do it is a low traffic web server with nothing too flash running on it - no MySQL, no fancy frameworks etc, so I wasn't expecting any issues and for the most part didn't get any. In fact the whole thing went surprisingly smoothly, the only gotcha I encountered was the systemd predictable network interface names which meant that eth0 was now ens3 so the interfaces file no longer worked on boot. You can fix this by changing the line "iface eth0 inet static" to "iface ens3 inet static" or editing the udev rules to name the interface eth0 again. Edit /etc/udev/rules.d/70-persistent-network.rules and change the

KERNEL=="eth*", NAME="eth0"
KERNEL=="ens*", NAME="eth0"

and reboot. Once up your interface will be named back to eth0.