Because I fried my server’s hard drive, I had to reinstall Ubuntu Lucid Server. Of course I didn’t have a Lucid Server disc, and, because physical media is dead to me, I didn’t have any blank CDs to burn. I don’t have any spare thumb drives, either. Therefore, I couldn’t install Lucid server. Instead, I had to install Hardy Server (Ubuntu 8.04) using the old disc that I did have on hand, and upgrade it via the package manager. Fortunately, this was really simple.
Performing the Upgrade
After I installed Hardy via CD, the first thing I did was issue the command
$ sudo do-release-upgrade
This is the command to upgrade to the latest release. (It isn’t apt-get dist-upgrade, which is a common misconception.) It relies on the package upgrade-manager-core, which was installed by default by the Hardy installer.
The upgrade manager will determine which packages need to be removed, updated, or added. There are a few times during the upgrade that require interaction. You have to choose whether to keep or overwrite certain configuration files. (I chose to overwrite them, since I was upgrading from a fresh install.)
After the scripts ran, I rebooted the server. Upon logging in again, I ran the following command to determine which version of Ubuntu I was using:
$ lsb_release -a
Sure enough, it told me I was running the latest LTS release.
mjdescy@thor:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
How to Upgrade to a non-LTS Release
The configuration file for the upgrade manager is found in /etc/update-manager/release-upgrades. This file has one setting, called prompt, that you can change to suit your needs. I didn’t have to change it, because the default setting tells the update manager to look for LTS (long-term support) releases only. (Lucid and Hardy are both LTS releases.) If you change prompt to normal, the upgrade manager will allow you to update to non-LTS releases, such Maverick Meercat, once they are released.
How to Upgrade to a Development Release
After changing the upgrade manager prompt to normal (see the section above), you can also upgrade to a development release by running the upgrade manager with -d argument. In the past, I ran this method to upgrade from Hardy to Lucid prior to Lucid’s final release.
$ sudo do-release-upgrade -d