Upgrading to Ubuntu 9.04 – things I learnt yesterday

I never upgrade my main machine to a new Ubuntu release on day 1.

It’s not really that I don’t trust the release crew to get it right, it’s more about wanting to let the storm of downloads, patches, reviews, comments and advice settle before I take the risk (however small) of being without a machine for a day.

I’ll usually download and seed the torrent and I’ll happy upgrade any number of virtual machines but I’m a bit more cautious when it comes to my primary development machine.

So I was going rather against type yesterday when I downloaded 64-bit Ubuntu 9.04 (also known as AMD64 Jaunty Jackalope) and followed the instructions on http://www.ubuntu.com/getubuntu/upgrading

The first thing an Ubuntu upgrade process asks you about is whether or not you want to include updates from the internet.

screenshot-updates-window

I usually say “no” because I want to upgrade as fast as possible and don’t want to be tied to download speeds. I’m upgrading from the CD so the network won’t be used then, right? Upgrade shouldn’t take too long then, right?

So why do I see this:

screenshot-distribution-upgrade

Why is it going to take 4 hours to upgrade my machine from a CD? And what’s with the 62.2kB/s?

The first time I upgraded an Ubuntu installation I assumed  I’d misread the question but it’s consistently done that on all upgrades since. Why?

Yesterday, during the four hours I had to muse this, I finally worked out what’s going on.

The release CD contains a complete core Ubuntu install with the latest version of all the packages that form that core. However when you run the package manager you see that there are over 26,000 software packages that form part of this release. They’re not all on that CD! However a specific version of each of them is associated with any given release of Ubuntu.

A well known example of this was OpenOffice. OpenOffice 3.0 was released just before Ubuntu 8.10 came out last year. There were a lot of people asking for it to be included in the 8.10 release but The Powers That Be decided that it was too new and untested to slip in at the last minute and Ubuntu 8.10 shipped with OpenOffice 2.4.1 instead. At no point in the following 6 months was OpenOffice rolled out as an upgrade to Ubuntu 8.10 – new features don’t get updated in existing released versions of Ubuntu, only security patches and bug fixes get sent out like that. Development of OpenOffice continues independently and, when the next version of Ubuntu is being planned, a current (or fairly current) version of OpenOffice is taken for inclusion.

OpenOffice is just one of many pieces of software that are controlled through the Ubuntu package manager and in a way it’s a bad example because it’s physically included on the release CD. But most of those 26,000 packages listed in the package manager are NOT on that CD. If I choose to install (say) the Netbeans development environment, the package manager has to download it from the internet. If I’m running Ubuntu 8.10 I will be given Netbeans 6.1 and it’ll stay at 6.1 (plus bug fixes and security issues) forever. However Ubuntu 9.04 contains a more recent version of Netbeans – version 6.5. So when I upgrade from Ubuntu 8.10 to 9.04, the upgrade process has to go fetch that new copy of Netbeans as it’s performing my upgrade. And it has to do this for hundreds of other packages I’ve installed which aren’t on the CD. And it has to do this at exactly the same time that thousands of other people are running the Ubuntu upgrade and doing the same thing!

So NOW I finally understand why my Ubuntu upgrade always has to hit the internet and I finally understand why it’s so slow. The package manager is a wonderful system and I think I can put up with a four hour upgrade given all the other wonderful things it gives me.

Comments are closed to reduce the spam. If you'd like to add something, please use the contact form to let me know and I'll reopen comments for you. Thanks