It’s time to upgrade home servers, so I have finally gotten aroud to upgrading one system from Ubuntu 19.04 to Ubuntu 20.04
Before Attempting an OS Upgrade
I think it’s important to reiterate: just like with any other in-place major software or OS upgrade, make sure you have backups of your system and a plan to recover from them.
What I mean by having a plan is some basic considerations like:
can you boot that system from a different disk or USB stick?
do you have the install media prepared (and ideally - tested)?
once booted, might there be some issues accessing your old installation like distro mismatch or disk encryption?
do you have the root password? have you checked that it works? if system fails to boot, you will need it for single user mode
do you have password protected GRUB or BIOS password that you don’t necessarily remember anymore?
do you have access to the server console? if it’s a desktop, do you have a monitor and keyboard that will connect (do you have the right cables, will they match the ports you have on the system and do your cables actually reach that system if you urgently need to plug display in)
I hardly mention these lately, but can confirm that each one of these considerations helpd in a relevant scenario - not that long ago. Things like “DVD drive died” or “USB stick worked on 64bit but won’t boot on 32bit system” happen all the time - so it pays to spend 5-10min going through this list before kicking off the upgrade.
How To Upgrade Ubuntu 19.04 to 20.04
If you know Ubuntu Releases at all, you should remember that there’s usually another release between 19.04 and 20.04 - it’s 19.10.
All the x.10 releases are called interim releases - they’re issued about 6 months after each x.04 release and are not supported even for a full year. So you must upgrade very quickly from x.10 release to the next release available.
All the x.04 releases are LTS releases - Long Term Support. This means they’re usually good for a couple of years - fully supported with maintenance updates. For instance, 20.04 will be supported until late 2022 (at which stage the next LTS release 2022.04 will be available).
Before Any Ubuntu Release Upgrade
Be sure to fully update your current OS:
shutdown -r now
Once these are done, you can progress to the OS upgrade
Upgrading to Ubuntu 19.10
I simply ran the do-release-upgrade command as root. See how it picked up the next release:
… after all the calculations I got the summary for the proposed upgrade - you get it before the download of all the packages starts:
Looked good, so I pressed y and continued.
It took about 30min to download and upgrade packages, and then I rebooted again.
Actually, then I tried to upgrade, but Ubuntu is smart enough to insist on a reboot before doing the next OS upgrade:
Upgrading to Ubuntu 20.04
Do a basic check of your system:
does it still boot fully
can you access your files
does it start the services you have configured?
And we can continue:
and after a bit - the usual OS uprade summary. More than a thousand of packages will be upgraded, apparently:
Why I said You Need To Be Prepared
As luck would have it, this was the time when something went wrong. Perhaps I rebooted the server from another console, but it went down and they wouldn’t boot anymore - I forgot how tricky this 32bit/64bit mix of an mini-server this this is. It just wouldn’t boot anymore.
I had to reconnect my display/keyboard, boot into previous kernel and complete the upgrade:
One more final reboot (shutdown -r now) and we’re sporting the Ubuntu 20.04 OS: