Ubuntu provides a fairly fool proof way to upgrade from one version to the next but it can take literally hours – when I upgraded my netbook from 9.10 it took just over 4 hours.
The reason for this is that ubuntu’s update-manager downloads everything. What’s worse is if you want to upgrade from a version earlier than 9.10 you must upgrade one release at a time.
Now I’ve got one machine that’s running 8.10, so I’ve got to upgrade to 9.04 first, then 9.10 before I can upgrade to 10.04. If it’s going to take 4 hours a piece then that’s 12 hours at least.
So how can you speed things up if you have either a slow connection or if you have to do multiple upgrades?
Well there’s two ways, the first is to upgrade from scratch – however that’s not viable if you are upgrading a configured machine that gets heavy usage.
The other is to use the alternative iso’s and upgrade from there.
So for that machine running 8.10, I need to download the 9.04, 9.10 and 10.04 alternative iso’s, in this case the for the i386 platform.
Here’s some links to those iso’s:
Now for the upgrade process. Either burn each iso to disk, or mount it locally and run the upgrade.
peter@kodos:~$ sudo mount -o loop ubuntu-9.04-alternate-i386.iso /media/cdrom0
Ubuntu should show the upgrade dialog, however if it doesn’t – or you are doing this over an ssh connection then you can start it manually – just remember to use -Y with the ssh command 😉
peter@kang:~$ ssh -Y kodos peter@kodos:~$ sudo mount -o loop ubuntu-9.04-alternate-i386.iso /media/cdrom0 peter@kodos:~$ gksu "sh /cdrom/cdromupgrade"
You must do this for each step and you can’t skip any of them.
Tip: It will prompt you to check for updates during the procedure. Unless you are upgrading to the latest version, or the intermediate steps (9.04, 9.10 etc) you can safely say no here. This will actually save you a lot of time downloading updates only to wipe them out with the next upgrade.
I found that going from 8.10 to 9.04 took about an hour, but 9.04 to 9.10 just half an hour – a big saving.
Update 2010-05-05: If you are remotely updating a server (i.e. does not have desktop installed) then you can’t use gksu as above. Instead use:
peter@kang:~$ ssh kodos peter@kodos:~$ sudo mount -o loop ubuntu-9.04-alternate-i386.iso /media/cdrom0 peter@kodos:~$ sudo /cdrom/cdromupgrade