November 25, 2008

Upgrading to the newest Fedora release

Author: Bruce Byfield

With Fedora 10 scheduled for release today, many users are thinking about how they are going to upgrade. A complete upgrade is something you do no more than twice a year, so the details are easy to forget. Also, the Fedora upgrade process, which centers on pointing to a new repository, is more complex than, say, the equivalent Debian process, in which repositories remain constant and only their contents change with a new release. But an even stronger reason for the uncertainty is that a Fedora system can be upgraded in at least four ways, each of which has its advantages and disadvantages.

Regardless of the method you use, before upgrading Fedora, you should look at steps 1 and 2 of the Yum Upgrade FAQ. These steps offer sensible advice about how to prepare for an upgrade. The advice includes reading the release notes to be aware of any problems, doing a current backup, making sure that your system has the latest updates, and dealing with any .rpmnew and .rpmsave files -- the new and old configuration files that have been affected by updates.

At the same time, the FAQ suggests, you might want to do a little housekeeping and remove any unneeded programs or configuration files, on the grounds that the less that is present on your system, the fewer chances for anything to go wrong. The easiest way to deal with such material is to install the yum-utils package, then use its command package-cleanup --leaves.

If you are really cautious, you might want to take the extra measure of removing any proprietary drivers you are using -- especially ones for your video card -- since you will probably have to upgrade those in a separate process after the main upgrade anyway. During the upgrade you can use a free driver instead, since an upgrade hardly requires 3-D graphics.

As a final preliminary, if you have SELinux enabled, turn it to permissive mode, so that it does not react to attempts to change configuration files.

With these preliminaries out of the way, you can start to think of which upgrade process you are going to use.

Upgrading from the CD or DVD

Probably the most familiar upgrade option is to upgrade from a CD or DVD. The Fedora 9 Install Guide summarizes this method neatly:

The installation system automatically detects any existing installation of Fedora. The upgrade process updates the existing system software with new versions, but does not remove any data from users' home directories. The existing partition structure on your hard drives does not change. Your system configuration changes only if a package upgrade demands it.

However, the familiarity of this method is also its chief disadvantage. Because so many people are likely to choose this option, you may face slow download times for the CD image, much less a DVD, in the first few days after a release. Still, if you do manage to download a DVD, you won't need to worry much about accessing online repositories during the actual upgrade, which should speed up the process.

Upgrading manually

Instead of downloading an entire disk image, a simpler alternative is to add to the repositories your system recognizes. Unfortunately, you cannot add repositories via the graphical System -> Administration -> Software Sources, which only enables or disables existing sources. Instead, you have to open a text editor or a command line.

You can use an existing repository definition in /etc/yum.repos.d. as a model to create a new one. The definitions in this directory look complicated, but the only changes you need to make are in the names, base URLs, and GPG keys, all of which you can crib from looking at the repository that you are adding in your Web browser. To make things simpler, you could set the gpgcheck field to 0 to turn off the use of the GPG key, but for security's sake, you should avoid that course. Add the new repositories, reboot, and you will be ready to upgrade.

An easier manual method is to run the command rpm -Uhv In this command, the release number is simply the number of the release. This command will update your repositories, providing informational messages that allow you to track its progress.

After either course, you can begin the upgrade by entering yum upgrade at the command line. If you want to ensure that particular package groups are upgraded, you might want to enter more specific command; for example, to make sure that everything in the Base group is installed, you would enter yum update Base. You can see a list of package groups by entering the command yum grouplist.

Whether you like these manual preparations depends on what type of user you are. If you are an experienced user, you may prefer these methods because they allow you to see exactly what is happening. By contrast, if you are primarily a desktop user, editing configuration files and working from the command line may make you uncomfortable.

Upgrading with fedora-release

A third alternative is to use a convention that Fedora has evolved to help users update their systems to a new release. For a few weeks before and after a release, Fedora provides an updated fedora-release package in the repositories of a new release's alpha, beta, and release candidate repositories, as well as the repository for the previous release. After this period, you can go to a repository for the new release, download its version of fedora-release and install it using the command yum localinstall fedora-release. Reboot after installing the package, and you can upgrade your system using the update applet in the panel's notification tray or by using the command yum update.

This method avoids the long preliminary download of an ISO image, but it forces you either to upgrade at the peak period for use of the newest repository, or, if you wait too long, to perform the extra step of hunting down the necessary version of fedora-release. In other words, delay too long and the main advantage of this method is lost.

Upgrading with PreUpgrade

Since this spring a fourth option is to install Fedora's PreUpgrade package.

Once a release is available, you can run PreUpgrade at any time by entering the command preupgrade as root (in Fedora 10 and later, you will be able to start the program directly from PackageKit, the default software installer). PreUpgrade is a wizard that steps you through the necessary upgrade steps. Your only input to the wizard is to select the distribution to which to upgrade, and click the Apply and Forward buttons to move through the wizard. PreUpgrade downloads the packages needed by the upgrade, and you can continue to work until you are ready to reboot and finish the process.

Using PreUpgrade is probably the easiest way to upgrade, and from the traffic on the Fedora user list, it's probably the one that most people plan to use on Fedora 10. However, experienced users might not appreciate being insulated from system changes by a graphical interface. Also, at least one user has noted that PreUpgrade does not yet verify cryptographic signatures, which might make anyone who is security-cautious hesitate to use it just yet.

Final steps

Whichever method of upgrading you use, the basic upgrade is only the first step. After you have verified that the upgrade has left you with a working system, you will still need to check for any upgrades from alternative repositories such as RPM Fusion. In some cases, you may need to go to a manufacturer's site for new drivers. And if that seems tedious -- well, that's the price you pay for not sticking with Fedora's free-software-only policy.

The last step is to check the new .rpmnew and .rpmsave files on your system. Many of them will have minimal effect on your system's daily operations, but some may have security improvements that you should implement right away, while others may undo some of your customizations. Either way, you should examine each one carefully in order to determine what to do with it. Some people automatically accept all changes, while others just as automtically reject them.

Deal with the .rpmnew and .rpmsave files as soon as you've upgraded to the next release, and you can upgrade from the panel applet for another six months before you need to remember the necessary maneuvers for the next version upgrade.


  • System Administration
  • Fedora/Red Hat
Click Here!