Upgrading Red Hat Linux/Fedora Core with yum 


It is possible to upgrade your Red Hat Linux/Fedora Core system using yum instead of choosing a CD/DVD-based install or upgrade option. Only experienced Red Hat/Fedora Core users should attempt this, as the upgrade process is not necessarily seamless.

yum (Yellow dog Updater, Modified) is an excellent tool for package management. With yum, installing packages with dependencies and keeping systems up to date is easy. The tool is similar to apt for rpm and Red Hat's included up2date, although yum arguably has several advantages. In addition, yum makes upgrading between Red Hat releases relatively easy, similar to apt's dist-upgrade feature.

Theoretically, you should be able to upgrade from any Red Hat Linux/Fedora Core release to any Red Hat Linux/Fedora Core release with a yum-compatible repository (i.e. containing yum "header" files). I have successfully upgraded from Red Hat Linux 7.2 to 9, from 8.0 to 9, from 9 to Fedora Core 1, and from Fedora Core 1 to Fedora Core 2 using these steps.

The steps are slightly different when upgrading to Fedora Core releases versus a Red Hat Linux release (i.e. through Red Hat Linux 9), so the steps are presented separately.

Upgrading to Fedora Core 2 

You may want to read the following notes from the author of yum author about upgrading from Fedora Core 1 to Fedora Core 2: http://linux.duke.edu/~skvidal/misc/fc1-fc2-yum-hints.txt

Here are the steps I used to upgrade a system from Fedora Core 1 to Fedora Core 2:

  1. Install the Fedora Core 2 version of yum and fedora-release:

    rpm -Uvh ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/2/i386/os/Fedora/RPMS/yum-2.0.7-1.1.noarch.rpm \ ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/2/i386/os/Fedora/RPMS/fedora-release-2-4.i386.rpm
  2. If yum was already installed prior to the upgrade, backup your old /etc/yum.conf file and replace /etc/yum.conf with /etc/yum.conf.rpmnew.

    mv /etc/yum.conf /etc/yum.conf.`date +%m.%d.%y`
    mv /etc/yum.conf.rpmnew /etc/yum.conf
  3. Edit /etc/yum.conf. Choose a mirror from http://fedora.redhat.com/download/mirrors.html to the [base] and [updates-released] sections.

    Original [base] and [updates-released] sections:
    name=Fedora Core $releasever - $basearch - Base
    name=Fedora Core $releasever - $basearch - Released Updates
    New [base] and [updates-released] sections:
    name=Fedora Core $releasever - $basearch - Base
    name=Fedora Core $releasever - $basearch - Released Updates
  4. Upgrade to Fedora Core 2.

    yum upgrade

Upgrading to Fedora Core 1 

Here are the steps I used to upgrade a system to Fedora Core 1:

  1. Download and install the Fedora version of yum:

    rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/yum-2.0.4-2.noarch.rpm
  2. Download and install the fedora-release package.

    rpm -Uvh http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/Fedora/RPMS/fedora-release-1-3.i386.rpm
  3. Upgrade to Fedora Core 1.

    yum upgrade

Upgrading to Red Hat Linux 9 

Here are the steps I used to upgrade a Red Hat Linux 8.0 system to Red Hat Linux 9. To upgrade to a different version, download an appropriate redhat-release package:

  1. Download and install the latest version of yum.

    rpm -Uvh http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.4-1.noarch.rpm
  2. Download and install the redhat-release package from the "new" version of Red Hat Linux.

    rpm -Uvh ftp://ftp.quicknet.nl/pub/Linux/ftp.redhat.com/9/en/os/i386/RedHat/RPMS/redhat-release-9-3.i386.rpm
  3. Upgrade to the new release.

    yum upgrade

The following are some problems I ran into with the upgrade from 8.0 to 9.


Resolving dependencies
package apt needs librpm-4.1.so (not provided)
package apt needs librpmdb-4.1.so (not provided)
package apt needs librpmio-4.1.so (not provided)
package apt needs libelf.so.0 (not provided)

Solution: rpm -e apt (I will use yum instead of apt for rpm for package management; I could always manually reinstall apt for rpm after the upgrade)


Resolving dependencies
.......identical dependency loop exceeded
package gnome-vfs2 needs gnome-mime-data >= 2.0.0-11 (not provided)

Solution: yum remove gnome-vfs2 (this will remove several packages; you may manually reinstall these after the upgrade if necessary)

Problem: after rebooting into the new kernel, my eth0 network interface was brought up with a static address and then with dhcp. During the upgrade process, the file /etc/sysconfig/network-scripts/ifcfg-eth0.dhcp was created. You may want to check /etc/sysconfig/network-scripts for any changes prior to rebooting after the upgrade.

(c) brandonhutchinson.com

Last modified: 06/03/2004

Upgrading from FC1 to FC2 using yum - a few suggestions 


There are certain things only anaconda can do. There is no other way around it. If you're using LVM stop reading and know that you must use anaconda to do this upgrade.

In general, if you're not cramped for space/time/something you should use anaconda to upgrade. You'll find you come out with a much more reliable upgrade process and much less pain. However, if you'd like to try to upgrade the whole system via yum you should follow these instructions.

Before you start it would be a good idea to do the following:

  • run rpm -q kernel kernel-smp

    compare the results to the kernel you are running (uname -r).
    run 'rpm -e' for each of the kernels that you are not using
      rpm -e kernel-2.4.22-1.2115.nptl kernel-smp-2.4.22-1.2115.nptl
    Do the same with kernel-source packages.
       rpm -e kernel-source-2.4.22-1.2174.nptl
    This will make things a lot easier on you, trust me, and it frees up a HUGE
    amount of disk space.
  • run: yum clean all That will get rid of built up crap in /var/cache/yum
  • run mv /etc/modprobe.conf /etc/modprobe.anacbak
  • this is something anaconda would normally do to fix a problem in the modprobe's generated in FC1.
  • Edit your /etc/yum.conf and remove all repositories except for the new FC2 repositories. Remember to use mirrors not just the download.fedora.redhat.com main site.
  • You'll want to exit X (if you're running it on the machine you're upgrading)
  • Press ctrl-alt-f1 to get the to text console.
  • Login as root.
Another option for upgrading is this:
 yum upgrade yum python rpm-python rpm glibc glibc-common \
             redhat-config-\* XFree86\* libxml2\*
This will upgrade a number of critical packages first and helps create a
safe(r) environment for yum to upgrade.
   After this finishes continue with the rest of the instructions.
  • run: yum upgrade wait for it to either resolve your deps or tell you that some misc package you installed can't be sorted out under FC2. :)

    If the latter occurs look for where you got that program from and see if
    you can either:
     1. add their FC2 repository to your yum.conf or
     2. remove the package and try again.
    If it the former occurs, press 'y' and hit enter.
  • Then wait for the upgrade to continue.

If yum appears to stall out after: Test transaction complete, Success!

That is due to a test run for diskspace. It is doing things here but nothing that reports in any meaningful way until it is done. Sorry about that. It's something I intend to correct.

After the upgrade completes you may find yum exits unhappily when it goes to make the new kernel the system default. Don't worry about this - it's not a big deal. It may or may not happen depending on how your system was patched, or not, as the case may be.

After you've finished the upgrade you should run: /usr/sbin/fix-mouse-psaux to update the system for the 2.6 kernel input layer.

Reboot your system, make sure the 2.6 kernel is selected from grub when your system boots. If it isn't you should edit your /etc/grub.conf and change the default= to point to this kernel(typically default=0)

Hope this helps, if you encounter tracebacks file them at bugzilla.redhat.com and I'll take a look.

documented on: 2004.06.16