Useful pages:
-
https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-ubuntu-16-04-lts
-
Back up your system.
-
At a minimum get a good backup of /etc/.
tar cvfz etc.tar.gz /etc
-
stop chef-client
-
review
/etc/apt/sources.list.d
and disable any not needed/wanted for upgrade process. -
make sure apt is willing to let you do an lts upgrade by checking
/etc/update-manager/release-upgrades
and twiddlingPrompt=lts
if needed.
apt update
apt upgrade
apt-get autoremove
-
make sure
/boot
has enough free space to install a new kernel. clean up old/spare kernels if you don't have enough space. You'll regret it if you don't double check it - it is recoverable if you are careful but why hurt yourself. -
Launch a
tmux
do-release-upgrade
-
Take note at start when it creates a new ssh server for you.
-
On a seperate machine start another
tmux
and ssh into that new ssh server port -
you may need to disable/open firewall to allow this to work. Keep that in the background incase things go sideways.
Good luck
rm /etc/apt/apt.conf.d/50unattended-upgrades.ucf-old
apt remove upstart
rm /etc/X11/Xsession.d/*upstart*
Find any kernels you are not running and remove them
dpkg --list | grep linux-image | grep -v `uname -r` | grep -v linux-image-generic | awk '{print $2}'
It might be handy to redirect that output to a rm_kerns
file and then doing the following dance:
for I in `cat rm_kerns | grep extra`; do dpkg -P $I; done
for I in `cat rm_kerns | grep -v extra`; do dpkg -P $I; done
That should free up space on /boot
allowing you to do the normal apt-get update && apt-get autoremove
dances for proper cleaning.