Upgrading Ubuntu
Posted on: 15 March 2009
OK, this one was entirely my own fault, but it's a useful cautionary tale to anyone running any version of Ubuntu.
For some time now I've been running an Ubuntu 7.04 server as my virtual development server, and it's been working out just great. The trouble started when I needed to process incoming emails using a PHP script. Now, there's a rather handy PHP IMAP library to do just this. Thanks to Ubuntu's use of the Synaptic package manager, installing it is a simple "sudo apt-get install php5-imap" command. And that's where trouble began.
Rewind a step. Canonical (the company behind Ubuntu) have a rather sensible policy regarding version support - they relese a new version every six months or so, but commit to keeping long term support (3 years for desktops, 5 years for servers) for specific versions (known as LTS versions), enabling IT departments to use it safe in teh knowledge that they won't have to upgrade all their servers every six months.
My mistake was in thinking that 7.04 was an LTS release. It wasn't. Last October, 7.04 was end-of-lifed, and by December the software repositories had been taken offline. This meant that no more updates could be installed to a 7.04 installation, including my PHP IMAP library.
The simple solution to the problem is to upgrade to 7.10, which is a simple "sudo do-release-upgrade" command. However, this depends on the 7.04 repositories still being available, which seems kinda bizarre. So this doesn't work any more.
One suggestion was to download the 7.10 alternate installation CD and run the installer from there. However, there's a bug in the installer, which is part of a mammoth .tar.gz. So I ended up having to unpack all the installer, fix the bug, pack it all back up again, then run again. After several hours spent on all this, I finally got my server upgraded to 7.10, and all seemedf good.
However, all was not as it seemed. I started getting random server hangs - the VMWare server process would max out my CPU, and I couldn't even get a console prompt in my VMWare Server console. There was more weirdness too - the "top" command sporadically would just display a blank screen, but putting the process into the background then restoring it would redraw the screen. sudo commands simply wouldn't work - as though I'd entered the wrong sudo password, except it didn't tell me the password was incorrect, and I was extra-careful typing it in.
After a few days of working like this, I bit the bullet and built a new dev server, this time using Ubuntu 8.04, which is definitely an LTS version - my server should be fine running this for the next five years! Thanks to the simple Linux (and Unix) philosophy of keeping application installations simple and file-based, moving things like my MySQL databases, Apache configs and Subversion repository to the new server only took about an hour.
Lesson learned - either use the LTS version, or upgrade to the latest version as soon as it is released!