Thursday, April 26, 2012

How to Upgrade to Ubuntu 12.04 Precise Pangolin

Ubuntu 12.04, the new LTS version of Ubuntu, which would be supported for 5 years on both the desktop and the server, has just been released. Unlike Windows, Linux in general and Ubuntu in particular have got better mechanisms to upgrade from one version to the next. To be clear, I am talking about an in-place upgrade of an already installed system, as opposed to doing a fresh installation. And this is how to do that for Ubuntu 12.04.

Prerequisites

So that you eventually end up with a working and functional upgraded system, and in the worst case, don't lose any important data, before going for the upgrade, make sure that:
  1. All of your important data is backed up.
  2. All of the available updates for the currently installed system have been installed:
    sudo apt-get update
    sudo apt-get upgrade -y
  3. You've disabled any third-party repositories/PPAs in your 'Software Sources' under the 'Other Software' tab.
  4. You've chosen the best server for your location. To do so, under 'Software Sources > Download from', choose 'Other...' and click on 'Select Best Server'. It would run a ping test on all available servers and select the most responsive one, then just hit 'Choose Server' to confirm it. This is especially important if you are going for the upgrade in the first couple of days after the release has happened, as the servers are usually heavily overloaded then!
  5. You've booted your PC from a Live medium of Ubuntu 12.04 (CD or USB) and made sure all of your hardware is compatible with this version.
Although this is not really mandatory, I would recommend to wait some 2-3 weeks until after the new version has been released. By then, most of the bugs that weren't noticed/fixed during the development cycle should also be fixed. But that is entirely up to you. If you are an enthusiast, you probably want to upgrade as soon as the release is out.

For some more info, and also for help if the upgrade doesn't go well for you, please refer to the Ubuntu Forums thread here:

http://ubuntuforums.org/showthread.php?t=1946145

Upgrade from 10.04 and 11.10 - Desktop

Users of Ubuntu 10.04 and 11.10 can upgrade directly to 12.04. For Ubuntu 10.04, that's because it's also an LTS version, and you can always upgrade directly from one LTS version to the next.

So, to go about that, open up the Update Manager and click the "Check" button. If you've followed the prerequisites section above and already installed the available updates, you would be immediately presented with an option to upgrade to the newer version.


Hitting the 'Upgrade' button would obviously start the upgrade process but it might take some time to finish.


Images from: http://www.ubuntu.com/download/desktop/upgrade

Upgrade from 10.04 and 11.10 - Server

For upgrading a server installation from 10.04 or 11.10 to 12.04, you need to run these commands:

sudo apt-get install update-manager-core
sudo do-release-upgrade

Upgrade from 11.04 - Desktop & Server

Users of Ubuntu 11.04, whether desktop or server, first need to upgrade to 11.10 and then to 12.04. That's because, unlike with LTS versions, you can't skip intermediate versions with regular releases.

So, be patient and first go through the prerequisites above and upgrade to 11.10 and then to 12.04. Make sure that once you've upgraded to 11.10, you install all the available updates for 11.10 and only then proceed with upgrading to 12.04.

For upgrading from 11.04 > 11.10 > 12.04, just follow the instructions of the above desktop or server section, respectively.

However, if possible, doing a clean installation of 12.04 would be safer, easier and way more convenient for Ubuntu 11.04 users.

Upgrade from CD/USB

Although it is technically possible to upgrade an already installed system from a CD/USB, via the installer image, I would strongly advise against trying that, for a number of reasons:

The CD image only contains packages from the 'main' and 'restricted' channels of the official repositories, and if you've used the installed system at least for some time, you'll definitely have enabled and installed packages from the both remaining channels also, 'universe' and 'multiverse'. So the CD upgrade could at best upgrade the packages installed from the both first mentioned channels, all the other packages could not be upgraded and, thus, possibly even removed due to dependency conflicts that would inevitably arise! Please see this very recent example at the Ubuntu Forums of a miserably failed CD upgrade to Precise 12.04:

http://ubuntuforums.org/showthread.php?p=11874069#post11874069

On top of that, most of the packages that are on the CD are per nature outdated quite fast, as the image is, of course, static, whereas an upgrade over internet will always pull in the most recent versions of packages. So even if you manage to not break too much of your installed system through the CD upgrade, you would have to upgrade lots of packages afterwards anyway, and depending on how old the used CD image is at that time, the overall size of the needed download will go well beyond hundreds of megabytes as well!

Related Posts:

Installation , Precise Pangolin