Upgrading Ubuntu


People who already use Ubuntu have the option to upgrade rather than reinstall. Ubuntu follows a strict upgrade path between major revisions; you should not just upgrade straight from Hoary to Dapper. The upgrade path follows the major Ubuntu releases:

  • Warty Warthog (Warty, version 4) image from book Hoary Hedgehog (Hoary, version 5.04)

  • Hoary image from book Breezy Badger (Breezy, 5.10)

  • Breezy image from book Dapper Drake (Dapper, 6.06 LTS)

  • Dapper image from book Edgy Eft (Edgy, 6.10)

Note 

Although you could upgrade directly from Warty or Hoary to Dapper, this is likely to cause problems. Each upgrade assumes you are upgrading from the previous version. Skipping a version may break this assumption and cause upgrade problems.

To perform the upgrade:

  1. Make sure all packages are currently up-to-date:

     sudo apt-get update sudo apt-get upgrade 
  2. Edit the file /etc/apt/source.list. This file tells the apt-get command where to retrieve the software (see Chapter 4). Replace all instances of the current version with the new version. For example, when upgrading from Breezy to Dapper, change lines such as:

     deb http://us.archive.ubuntu.com/ubuntu breezy main restricted deb-src http://us.archive.ubuntu.com/ubuntu breezy main restricted 

    to

     deb http://us.archive.ubuntu.com/ubuntu dapper main restricted deb-src http://us.archive.ubuntu.com/ubuntu dapper main restricted 

  3. Perform the upgrade:

     sudo apt-get dist-upgrade 
Warning 

When you start the upgrade, there is no going back. Attempting to stop the upgrade will likely screw up the system, and a power outage during the upgrade can be disastrous. Be sure to make a backup before beginning the upgrade.

Determining the Version

Upgrading gets complicated when Ubuntu users refer to the operating system by names while the operating system reports numeric versions. The question becomes: How can you tell which version of Ubuntu is in use?

One approach is to use the graphical desktop. On the menu bar, System image from book About Ubuntu displays the version number and common name. Unfortunately, this is not an option for text-only systems such as the Ubuntu Server. This is also not practical for automated systems.

Another approach is to look at the current /etc/apt/source.list file. Assuming nobody has drastically modified the file, the common name for the operating system should be listed on the deb installation lines.

A better option is the lsb_release command. This command displays distribution specific information from the Linux Standard Base.

 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 6.06 LTS Release:        6.06 Codename:       dapper 

Upgrading Issues with Ubuntu

Ubuntu upgrades are not always painless. (I have not yet had a simple upgrade.) Although upgrading from a new Hoary install (with no additions) to Breezy to Dapper works well, you are unlikely to be running a new installation of Hoary or Breezy. Customizations lead to upgrade complications. For example:

  • Custom system files-Customizing files, such as /etc/gdm/gdb.conf (see Chapter 9), will prompt you to resolve installation conflicts. You can either overwrite or keep the old file, but you cannot merge changes.

  • Proprietary drivers-Binary and custom drivers, ranging from the Macromedia Flash player to wireless network support, may break. You will need to uninstall and reinstall the software.

  • Shared Libraries-Different versions of Ubuntu use different linked libraries. For example, Dapper uses newer libraries than Breezy. Code that is compiled for one set of libraries may break under the new system; be prepared to recompile as needed.

The time required to do an upgrade can be another significant issue. An upgrade usually takes at least three times longer than a clean install. This is because the upgrade checks files before modifying the system. While a 2 GHz computer may install in 15 minutes and upgrade in under an hour, a slower computer can take many hours. My 550 MHz iMac upgraded over the network from Breezy to Dapper in just less than 4 hours. The same computer did a network install of Dapper in less than 30 minutes.

Warning 

Be prepared to devote time to upgrading. Because you may be prompted occasionally to resolve conflicts, you cannot walk away and expect the upgrade to finish without your intervention. If the upgrade takes two hours, you should be near the computer for two hours. After the upgrade has been completed, you may need to spend additional time fixing broken drivers and recompiling software. (Be sure to stock up on coffee and order in for lunch.)

Even though Hoary, Breezy, and Dapper are all versions of Ubuntu, they are all major releases. They should be treated as different operating systems. Just as the upgrade path from Windows 2000 to Windows XP is not recommended, I don't recommend the upgrade path between major Ubuntu revisions. Instead, back up your files, inventory the software you need, and perform a clean install. After the install, restore your personal files and add in your software. This is faster and less painful than debugging Ubuntu after an upgrade failure.



Hacking Ubuntu
Hacking Ubuntu: Serious Hacks Mods and Customizations (ExtremeTech)
ISBN: 047010872X
EAN: 2147483647
Year: 2004
Pages: 124
Authors: Neal Krawetz

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net