Team LiB
Previous Section Next Section

Upgrading to Fedora Core

Upgrading may seem like a daunting task. "Will my programs be ok?" "Will I lose my settings?" "Will I lose my custom applications?" These are some of the questions that get asked over and over again when preparing for an upgrade. Answers to these questions and many more can be found in the following sections.

Before you upgrade your system, there are a few things you should do:

The process of upgrading to Fedora Core can be performed in many different ways. This chapter covers the three ways:

I also touch on some issues that may come up as you upgrade your system.

The process of upgrading differs from a new installation in that all the packages on the system are upgraded to the new version, but none of the settings are overwritten. This provides a way for you to get the new release installed without spending a lot of time reconfiguring your system to the settings it had prior to the upgrade.

Upgrading using the Fedora Core Installer

The Fedora Core installer, like previous incarnations of Red Hat Linux, offers the capability to upgrade from previous Red Hat Linux systems to Fedora Core. This method is arguably the most tested and most supported way of upgrading your system.

Starting the Upgrade

To start an upgrade process using the Fedora Core installer, boot your PC to the installation media (CD-ROM, DVD-ROM, floppy, PXE). This will bring up Anaconda, much like a normal Fedora Core install. After selecting your language, your mouse and keyboard, and your monitor, Anaconda will search for existing Red Hat Linux installs. If it finds any, you'll be given the choice to either upgrade or do a fresh install. Figure 3-3 shows the Anaconda screen where you can choose to upgrade an existing Red Hat Linux install.

Click To expand
Figure 3-3: Upgrade an existing Red Hat Linux install.

Once you choose to upgrade your existing install, you'll see some different screens and choices than you would with a standard install. The first screen you may see asks if you'd like to migrate your ext2 partitions to ext3. Migration is safe and causes no data loss. Figure 3-4 shows this screen, asking if I'd like to migrate my ext2 /boot partition to ext3.

Click To expand
Figure 3-4: Migrate ext2 to ext3.

The next screen asks you how you'd like to handle the boot loader. You have a few options:

  • Update your boot loader-This will update your current boot loader. This is the recommended option.

  • Skip boot loader updating-This will make no changes to boot loader configuration. If you are using a third-party boot loader (like Microsoft Windows), you should choose this.

  • Creat new boot loader configuration-This will let you create a new boot loader configuration. If you wish to switch boot loaders, you should choose this.

Next the installer will check your installed packages for things that it needs to upgrade. This process may take a while so don't get worried if you don't see anything happen on the screen other than the hourglass rotating.

On the next screen, click Next to upgrade to Fedora Core. A complete log of your upgrade will be saved to /root/upgrade.log.Based upon the package set Anaconda found to upgrade, you'll get a pop-up window showing which CDs you'll need to have to complete the upgrade. Figure 3-5 shows this screen.

Click To expand
Figure 3-5: Required install media.

If you don't have the required media handy, choose the reboot option to cancel the upgrade process, and start over when you have all the required media. If you click Continue, Anaconda will display a progress screen where you can track the progress of the upgrade process, as well as see the individual package names that are upgraded. Be sure to watch for requests to insert the next CD.

After all the packages are updated, you'll see two brief pop-up windows: the first tells you that the post-install configuration is being done, and the second notifies you that Anaconda is installing the boot loader. After these processes are complete, you'll see a screen that lets you know that the upgrade has finished, and you can reboot. Now you can reboot into your freshly upgraded Fedora Core 1.

Note 

Because of the nature of upgrades, you will not see any new software, such as the graphical boot screens of Fedora Core 1. An upgrade will only upgrade existing packages, and only install new packages if they are a dependency of an upgraded package. If you wish to add newly available software after you perform the upgrade, use the redhat-config-packages tool after you have completed the upgrade.

Checking the Upgrade

All that's left now is playing with your new Fedora Core system, and configuring everything just the way you like it. Be sure to review your upgrade log files. Your /root directory will contain an upgrade.log file, and possibly an upgrade.log.syslog file. upgrade.log is a log file of how many packages were upgraded, which ones, and all the packages that were available on the Fedora Core CDs that were not used as part of the upgrade process. You can quickly look through the packages that did not get used to see what you might be missing. Within the section of packages that did get upgraded, there may be some comments about configuration files and how the new ones were treated during installation. For example:

   Upgrading openldap-2.1.22 8.i386.
   warning: /etc/openldap/ldap.conf created as
   /etc/openldap/ldap.conf.rpmnew

This lets you know that the ldap.conf file that came with the new ldap server package was saved with the .rpmnew extension, so as to not overwrite your current configuration. While this is normally a good thing, there may be key elements to that new file that you need to replicate in your existing file. It's a good practice to compare the two files and make the appropriate changes.

An upgrade.log.syslog file is created if any of the package upgrades caused a message to get logged to the syslog facility. Here's an excerpt from an upgrade that I recently did:

   <21>Jan 24 12:b4:47 sendmail[1191]: alias database
   /etc/aliases rebuilt by root

   <22>Jan 24 12:54:47 sendmail[1191]: /etc/aliases: 63 aliases,
   longest 10 bytes, 625 bytes total

   <86>Jan 24 12:55:53 useradd[1259]: new group: name=dbus,
   gid=81

   <86>Jan 24 12:55:53 useradd[1259]: new user: name=dbus,
   uid=81, gid=81, home=/, shell=/sbin/nologin

These are messages that would have normally appeared in /var/log/messages, but were added to the upgrade.log.syslog file for you to review after the upgrade was complete.

Upgrading using Yum

A very popular, although not supported, method of upgrading your system is using the yum system. This allows "live" upgrades to happen, often without a reboot. At the most basic levels, you fool yum into thinking that the system it's installed on is actually Fedora Core, and then just tell yum to install all available updates.

Caution 

Given the unsupported nature of this type of upgrade, I cannot stress the importance of making a good backup of your data prior to attempting an upgrade.

An advantage to this upgrade method is that you upgrade automatically to the latest updates available, instead of upgrading to the initially released packages, then processing all the available updates. If you use any third-party package repositories, then with the proper configuration, you can update all the non-Red Hat packages on your system to the proper version along with your Red Hat packages.

When upgrading a Red Hat Linux 9 system to Fedora Core, it's best to use the yum that is included with Fedora Core, as the configuration will already be pointing to Fedora Core repositories. This RPM can be found at:

   http://download.fedora.redhat.com/pub/fedora/linux/core/1/i38
   6/os/Fedora/RPMS/yum-2.0.4-2.noarch.rpm

Download this file and install it with rpm. You may have to install the libxml2-python package from your Red Hat 9 media. Now that you have yum installed, you need to fool yum into thinking that you are running Fedora Core. To accomplish this, you need to install the fedora-release package from the same directory listed above. For this package you'll want to use the rpm -Uvh command as it will be upgrading the redhat-release package already on your system.

Once the fedora-release package is installed, you can issue the standard yum update command:

   # /usr/bin/yum update

After yum spends some time downloading all the header files for all the new RPMs (and updates), it will try to solve the dependency tree. Once it has done that, it will begin to gather all the RPMs. This can be quite a lengthy task, depending on how many packages you have installed, and where you're getting the updated packages from. If you're going to do this task for more than one system, it's a good idea to set up a local yum repository with all the necessary content to avoid the lengthy download multiple times. After yum gathers all the RPMs, it will attempt a test transaction. If this passes, it will proceed into updating all your packages. As each package transaction occurs, you'll see a comment to the right, something like syslinux 100% done 143/929. The numbers indicate how many actions have occurred versus how many are left to process. An action can be a package installation, a package removal, or a package %post script completing. A log of the upgrade process can be found at /var/log/yum.log. Once yum completes its task, you should reboot to the new kernel and your new Fedora Core system.

Upgrading using apt-rpm (apt-get)

Upgrading to Fedora Core using apt-get is very similar to using yum. You have to install the apt package, upgrade to the fedora-release package, and tell apt to update your system. This method is also unsupported, although nearly as popular, maybe even more so, than yum-based upgrades. Debian folk have been upgrading their systems with the Debian version of apt-get for many years, and swear by this method. Although apt-rpm and Debian's apt-get share a lot of the same syntaxes and theories, the methods by which packages are installed are quite different. This stems from the inherent differences between Debian's package platform (.deb) and Red Hat's RPM. Because of these differences, apt-rpm has to do a lot of different work to reach the same goal as apt-get. While this is not necessarily a bad thing, it is a new method, and thus shouldn't be as trusted as the tried-and-true Debian system. So again, make backups before you attempt to upgrade your system via apt-get.

Use the following instructions to upgrade with apt-rpm:

  1. Make a backup of your system in case of problems.

  2. The next step is to obtain apt-get. I recommend the apt package that Fedora.us provides, available at the following URL (which should be one line, with no spaces):

    http://download.fedora.us/fedora/redhat/9/i386/
    RPMS.stable/apt-0.5.5cnc6-0.fdr.8.rh90.i386.rpm.
    
  3. To fool apt into thinking it is on a Fedora Core system, you need to edit its sources configuration file, /etc/apt/sources.list. In this file find these two uncommented lines:

    rpm http://download.fedora.us/fedora redhat/9/i386
    os updates stable
    
    rpm-src http://download.fedora.us/fedora redhat/9/i386
    os updates stable
    

    Change these to point to the Fedora Core 1 repository, as follows:

    rpm http://download.fedora.us/fedora fedora/1/i386
    os updates stable
    
    rpm-src http://download.fedora.us/fedora fedora/1/i386
    os updates stable
    
  4. Next, tell apt that you'd like your kernel upgraded when you do a dist-upgrade. To do this, you need to edit the main apt configuration file, /etc/apt/apt.conf. Within this file, find the line

    Upgrade-Kernel "false";
    

    and change it to true:

    Upgrade-Kernel "true";
    
  5. Next, install the fedora-release package found at http://download. fedora.redhat .com/pub/fedora/linux/core/l/i386/os/Fedora/RPMS/fedora-release-1-3.i386. rpm (the URL should be one line, with no spaces). This package is an upgrade to the existing redhat-release package, so use the upgrade syntax of rpm (rpm -Uvh). This package includes the Fedora Core gpg key, which needs to be imported into your rpm system. After you upgrade to the fedora-release package, run the following command:

    # /bin/rpm -import /usr/share/doc/fedora-release-
    1/RPM-GPG-KEY-fedora
    
  6. Now you're ready for the actual upgrade. You issue two commands: The first command updates apt's package information, and the second acts upon this package information to actually process the upgrade:

    # /usr/bin/apt-get update
    # /usr/bin/apt-get dist-upgrade
    

    apt will check against its local package database and tell you which packages it will update, which packages will be replaced by a package with a different name, and which new packages will be added. It will also tell you what the size of your total download will be, and how much more disk space these packages will take once installed. Press the y key to proceed with the update.

    Much like yum, apt will then download all the packages it needs, and proceed to install them. As apt installs the package, you will get progress indications on your screen. You will see the individual package progress indication, as well as the total task indication marked in percentage format:

       210:kudzu
       #################################### [ 43%]
    

    This line tells us that the 210th package update, kudzu, is 100 percent complete with the installation, and this brings us up to 43 percent completion for the entire upgrade.

  7. When the upgrade is complete, you will need to edit the /etc/grub.conf file. apt will not make the new kernel the default option. The default= stanza of the grub.conf file needs to be set to 0 for the first kernel listed. After that you can reboot, and enjoy your Fedora Core system.


Team LiB
Previous Section Next Section