Problem solve Get help with specific problems with your technologies, process and projects.

Upgrade decision: Ubuntu Server 11.04

Upgrading to Ubuntu Server 11.04 may not be necessary, as you may want to wait for the April 2012 release of Ubuntu 12.04 LTS. Learn about why to upgrade now, and how to do it.

Deciding whether or not to upgrade to the latest server version of Ubuntu from 10.04 long-term support (LTS) is not a straightforward decision. Ubuntu provides long-term support for specific versions of their software, most recently version 10.04, and issue periodic updates (most recently 10.04.3), to address security and application issues. But the next official LTS release won't be until April 2012.

These LTS releases are targeted for server and multi-desktop installations in the enterprise. This includes any server-based application or appliance performing some function such as DNS or a DHCP server. In most cases these installs would benefit from using LTS because of the long-term maintenance benefits.

Why upgrade to Ubuntu 11.04?
There are more reasons not to upgrade a production server than there are in favor. Because Ubuntu provides critical security patches when needed, that necessity to upgrade is eliminated. The old adage "if it ain't broke, don't fix it" really does apply here. Many of the enhancements in the latest release of Ubuntu are more targeted at the desktop version than for servers.

Additionally, the thorough testing process that should be conducted prior to upgrading a production server is time consuming and not something you would want to go through every six months to keep up with the regular Ubuntu release cycle.

Therefore, about the only reason to upgrade an existing LTS-based server is if it's some type of departmental or dual-use system where users login directly to the machine. In this case, it could make sense to upgrade and take advantage of the new user interface features.

The upgrade process for Ubuntu 11.04
Upgrading an existing system can be done from a terminal window with just a few commands. Before you start, back up your existing system. A tool like Clonezilla is helpful because you can connect an external USB hard drive and make a "bare metal" image copy of your system disk. If anything goes wrong with the upgrade, you can simply reverse the process and you're back to where you started.

An in-place upgrade from the command line uses the do-release-upgrade tool. If you don't have that installed, you'll need to issue the following command:

sudo apt-get install update-manager-core

This tool uses an options file to determine behavior named /etc/update-manager/release-upgrades. Figure 1 shows what this file looks like.

Figure 1. Click on image for larger version

If you wish to upgrade to the latest LTS version, you should set the prompt variable to LTS, otherwise it should be set to normal.

Once you have done these two steps, start the update as follows:

sudo do-release-upgrades

Figure 2 shows what you should see after the upgrade tool determines which packages and files need to be updated.

Figure 2. Click on image for larger version.

The total process could take some time depending on your Internet connection speed. I was able to complete the entire process in under 30 minutes using a virtual machine and a 5 MB DSL connection.

Checking your system
Figure 3 is an example of what you should see when using the uname – a command line tool to determine the version of your system prior to upgrading.

Figure 3. Click on image for larger version

Figure 4 shows what it should look like after the upgrade.

Figure 4. Click on image for larger version

At this point you'll want to go through the process of testing any existing applications to ensure they still work as expected. You might also want to scan the package manager log file to look for any error messages. A quick grep command should do the trick:

grep error /var/log/dpkg.log


grep fail /var/log/dpkg.log

If you're really a glutton for punishment, you could open the file with your favorite text editor and look through the entire thing. Be warned that this is a fairly sizable file, so it could take a while. There's also a directory named /var/log/dist-upgrade with a number of additional log files. A quick grep on the directory with the date timestamp of when you performed the upgrade should look something like Figure 5.

Figure 5. Click on image for larger version

It's a good idea to make another image backup of you system following the upgrade and system check. This will give you a working copy of your upgraded system.

Dig Deeper on Linux servers

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.