Updated: February 12, 2010
Every six months, a new edition of Ubuntu is released and the Update Manager that pops every now and then offers you the choice of upgrading your current version to a newer one. Every six months, Ubuntu users worldwide face a tough choice. Should they keep running their current version or should they upgrade? If so, when? What should they do before trying to upgrade? Is it better to install from scratch? What are the necessary steps to ensure a smooth, painless upgrade?
In today's article, I will try to answer all these questions. While this article is a tutorial, it is also an guide that should help you decide whether the upgrade process is the best choice for you. Follow me.
Ubuntu upgrade success
There's a number of official polls at Ubuntu forums, listing the success rate with Ubuntu upgrades over the years (and versions), which is definitely statistically significant and should serve you as a baseline in making your decisions. On top of these, you also get my own experience, so heed them both and make the right choice.
Using the figures as of December 31, for Ubuntu 9.10, out of a total 2309 going for the upgrade, only 680 people (29%) had a flawless experience. On the other hand, 791 people (34%) had unsolvable issues. The rest suffered from minor problems.
This means that two out of three suffered from some kind of problems. Just one third managed fine. Worse yet, one out of every three Ubuntu users who deigned to respond to that poll suffered a catastrophic failure during the upgrade. If these figures are acceptable for you, then you should consider upgrading. If not, go for a clean install.
My experience includes several attempts with upgrades, the first being from version 7.04 to 7.10, if I'm not mistaken. That attempt was a failure, with the system not being able to boot afterwards. Another attempt was with Ubuntu 8.10 to 9.04, again with no luck. Most recently, I've tried upgrading Jaunty to Karmic, with no luck, either. While the procedure seems to have succeeded, the system was unbootable afterwards. If you ask me, upgrading your Ubuntu using the built-in function is not the way to go.
Ah, a good question. How can you still have your distro upgraded, without losing all your data or settings? Well, I hope this article will help you understand what you need to do to enjoy a painless computing experience and still manage to run the latest version safely, smartly and without any data loss.
Before doing any upgrade
Here's a list of things you MUST do before trying to upgrade your machine. While the list is rather generic and valid for all operating systems, the focus is on Ubuntu. Consider these steps as critical as breathing air. Without these, you should never, EVER attempt to upgrade your system.
This is the golden rule no. 1. Make sure your critical, personal, irreplaceable data is safely backed up in its entirety to an external device, like a USB disk, DVD, etc. Don't even try to attempt to upgrade before doing this most important step. You have a wide range of options available, including programs like Unison and Grsync, although the simple, plain ole copy will work too.
Imaging software allows you to create exact clones of your system, bit by bit, preserving every little thing that existed on the system at a given time. If you restore this image to another machine with compatible hardware or replace the existing system with it, you will be using an operating system that looks and behaves exactly the same as the day the image snapshot was taken.
If your system gets damaged, for whatever reason, you will be able to restore a healthy image and continue working with only a short downtime. To this end, make sure you have multiple system snapshots taken frequently and kept in several locations, including internal and external storage.
Separate /home partition
This is the best thing you can do to make sure your data is safe. By placing the personal files on a separate partition, you can safely overwrite the system (root) partition without harming your data. Thus, even if the upgrade procedure does not work as expected, your data is safe. Always, whenever possible, place the /home on a separate partition. This will significantly ease the maintenance of your system.
Other things to consider ...
Wait a little
Whenever a new edition comes out, do not rush to upgrade. Wait about a month or so, let the most glaring issues be sorted. This is always true, Windows, Linux, anything. Major upgrades can be tricky. No reason why you should be the early adopter.
In general, you will have a full year between a new version release and until the your edition is no longer supported. This gives you a plenty of time to update your system at a later date, although I admit the short release cycle is quite a pain. Long Term Support (LTS) releases are more convenient.
Running behind proxy
Ubuntu does not like upgrades when behind proxy. If you can, avoid trying to upgrade your system with proxy enabled. If you can't, the best thing you can do is manually replace the repo sources in the /etc/apt/sources.list file, but this is a geeky topic and we won't be reviewing it here.
Try to run the upgrade with a wired connection. If your wireless network gets disconnected during the upgrade, the process may fail and you might have to try all over again. Worse, something might get corrupted and you won't know it until too late.
AC power for laptops
Similarly, on laptops, do not use the battery power. The procedure is usually longer than the battery life of most laptops. Furthermore, your system might inadvertently lose power, go to sleep or throttle the CPU, leading to unexpected results.
Do not interrupt!
Leave the system be during the upgrade. Do not play with any of the applications. Let it work and do not interrupt the procedure by suspending, hibernating or rebooting the machine. In the base case, this will cost you time. In the worst and most likely case, this will completely and utterly screw the upgrade procedure.
How to upgrade
There are two ways to upgrade your system: 1) Use the upgrade function 2) Install from CD, but make sure your data is not overwritten during the installation.
Use upgrade function
This is the official way of doing it, but even most people on Ubuntu forums recommend you install from scratch. In order to avoid the loss of data, you will have to have a separate /home partition - or at least, the data fully backed up.
Launch the Update Manager. You should see the new distribution release message. Do not just click it yet. Make sure the system is fully up to date before using the Upgrade button.
Here's a screenshot from another system, showing the Update Manager with the current release fully up to date and no patches needed. Only in this case you should consider using the Upgrade function.
After firing the Upgrade button, you will see the Release Notes.
After clicking the Upgrade button, the installation will begin. Depending on your processor power, disk speed and network connection, the procedure can take several hours. Furthermore, throughout the installation, you may see one or two prompts, asking you to restart certain services. Since the specific steps are platform-related, I will not be showing any examples here to avoid confusion. For more details, please consult the official documentation.
Install from scratch (from CD)
This is what I recommend. This necessitates a separate /home partition, always a healthy computing practice. On production machines, personal data should be kept on at least one separate partition, possibly even a separate hard drive. For more help about installing Ubuntu, please considering reading my step-by-step guide.
This article is not a typical tutorial. It's more of a calculated-risk best-practice guide to upgrading your Ubuntu system smartly, safely and with minimal fuss, downtime and data loss. As such, it branches away from the purely technical aspects of the upgrade and present the reader with important usability aspects of the entire procedure.
In general, system upgrades are a complex, even dangerous procedure. There's no guarantee it will succeed. The only question is, what do you do if something goes wrong.
With frequent system images and data backups and by keeping your personal files separate, you will not need to worry much if the upgrade process fails. That said, you should make sure the ordeal goes as smoothly as possible. Stick to CD installs if possible, use wired connections, avoid proxies, and wait a little after the initial release until the biggest issues are sorted out. All these are ingredients in the recipe for a successful, painless upgrade.
I hope you liked this article and found it helpful. If you do require more detailed assistance in the upgrade procedure, then please feel free to contact me, I might update the article with additional explanations and screenshots.