Upgrading Ubuntu Release from 14.04 to 16.04

 

What are we doing?

  • Upgrading the release of Ubuntu containers in LXD
  • Overcoming Error: “Must be connected to terminal”

 

How?

After Ubuntu 16.04LTS was released I was rolling out upgrades to 14.04LTS installs but came across an error when trying to upgrade LXD containers running Ubuntu

Error: “Must be connected to terminal”

To overcome this, simply SSH into the container rather the using lxd exec container — /bin/bash. This can be done by setting a password for the root user, by adding RSA keys, port forwarding and SSHing from your LAN etc etc. The rest of the upgrade process is identical.

Allow Ubuntu to first upgrade to 15.10

nano /etc/update-manager/release-upgrades

Change the section lts to normal

Run the following commands to update repositories, upgrade packages, install the update-manager-core package (though it should already be installed) and finally upgrade the Ubuntu release

apt-get update
apt-get dist-upgrade
apt-get install update-manager-core
do-release-upgrade

Repeat the process to upgrade from 15.10 to 16.04

Leave a Reply

Your email address will not be published. Required fields are marked *