Upgrading from RedHat 8/9 to Fedora Core 1

Val Schmidt LDEO/Columbia

13 Nov 2003

 

These are some instructions for “upgrading” from RH 9 to Fedora without hassling with iso-images and all that other crap.  Instead of installing from the images, you install “yum”, point it to the Fedora release directory, and tell it to upgrade your system. Please read all of this before beginning, especially if you’re upgrading from RH8.

 

So far I haven’t had any problems with this approach, but I can’t say it is full proof.  If you find any problems or see any errors, give me a shout. I don’t know if I’ll be able to help, but I can at least post the issues here.

 

RH8: This general method should work with RH8 as well, but I haven’t tested it just yet.  For RH8 you should make sure to install the correct version of yum (see link below) and you may (or may not) have the same package dependency problems I mention in STEP 5.  I’d skip STEP 5 the first time, and if yum exits with errors, it’ll tell you what you need to remove.  Don’t be afraid of this, yum checks these things well in advance of making any permanent changes to your system. So if the errors frighten you off, you can safely stop.

 

[REVISED RH8 ERRATA:

RH8 requires a few extra steps.  This general recipe was provided by Dan Augustine when I got stumped:

Hi Val,

 

Thank you for the great report describing how to upgrade from RH8/9 to FC1.  I've figured out a clean way to update RH8 systems to FC1, and I thought you would like to know.  It's worked on five our systems RH8 so far. 

 

Here's the script I'm using:


rpm -e lokkit-0.50
rpm -e pine
rpm --rebuilddb

 

# Downloaded from: http://download.fedora.us/patches/redhat/8.0/i386/yum/stable/RPMS/
rpm -Uvh rpm-python-4.1.1-1.8x.i386.rpm rpm-4.1.1-1.8x.i386.rpm popt-1.7.1-1.8x.i386.rpm rpm-build-4.1.1-1.8x.i386.rpm
rpm --rebuilddb
rpm -Uvh libxml2-python-2.4.23-1.i386.rpm libxml2-2.4.23-1.i386.rpm yum-2.0.3-0.fdr.1.rh80.noarch.rpm


yum -y upgrade > ~/yum-upgrade.log 2>&1

 

Cheers,

Dan Augustine

END ERRATA] December 31, 2003

 

[MORE ERRATA]

Thanks for these instructions - they been a great help.  Couple of

things I've discovered in doing my own

RH 8 to Fedora upgrade that may help others:

    Error package gnome-vfs2 needs gnome-mime-data >= 2.0.0-11 (not

provided) -  change /etc/yum.conf

exactarch to exactarch=0; see

https://lists.dulug.duke.edu/pipermail/yum/2003-November/002782.html for

more information.

More rpms that need rpm -e:

    rpm2html

    galeon

 

Thanks,

      Eric Heien

[END ERRATTA] April 4 2004

 

Best of Luck!

 

STEPS:

 

1.      INSTALL YUM

Become root and install yum-2.0 or more recent.  You can get a copy at http://linux.duke.edu/projects/yum/download.ptml. Note the different version for each Redhat release. 

 

 

I installed yum-2.0.4-2.rpm.

 

     su

     rpm –Uvh yum-2.0.4-2.rpm

 

2.      CONFIGURE YUM.CONF

Copy your /etc/yum.conf to yum.conf.bak.  Then goto http://www.xades.com/proj/fedora_repos.html and copy and paste the text for yum.conf into a new /etc/yum.conf on your system.

 

[ERRATA: The link above has gone away, but the text to “cut and paste” is reproduced below with thanks to the original authors.

 

# Yum config file from http://www.xades.com/proj/fedora_repos.html

# Put this file at /etc/yum.conf

[main]

cachedir=/var/cache/yum

debuglevel=2

logfile=/var/log/yum.log

pkgpolicy=newest

distroverpkg=fedora-release

tolerant=1

exactarch=1

 

[base]

name=Fedora Core $releasever - $basearch - Base

baseurl=http://fedora.redhat.com/releases/fedora-core-$releasever

 

[updates-released]

name=Fedora Core $releasever - $basearch - Released Updates

baseurl=http://fedora.redhat.com/updates/released/fedora-core-$releasever

        http://ftp.dulug.duke.edu/pub/fedora/linux/core/updates/$releasever/$basearch/

        ftp://ftp.tu-chemnitz.de/pub/linux/fedora-core/updates/$releasever/$basearch/

        ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/updates/$releasever/$basearch/

 

[fedora-extras]

name=Fedora Extras $releasever - $basearch - Extra Packages

baseurl=ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora/$releasever/$basearch/yum/stable/

        http://download.fedora.us/fedora/fedora/$releasever/$basearch/yum/stable/

gpgcheck=1

failovermethod=priority

 

[livna-stable]

name=Livna 3rd party packages with questionable (in USA) licenses -- use at your own risk

baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/yum/stable

 

 

END ERRATA]

 

Remove all occurances of “$releasever” in /etc/yum.conf with “1” (no quotes).

 

So for example,

 

        baseurl=http://fedora.redhat.com/releases/fedora-core-$releasever
 

          becomes

 

        baseurl=http://fedora.redhat.com/releases/fedora-core-1

 

          [I’m told you can alternatively just add “releasever=1” to the beginning of yum.conf.

Seems logical. I haven’t tested this however.]

 

3.      GET GPG KEYS

Go get the gpg keys for verifying fedora packages.

 

You definitely need the fedora key at this link: http://www.hut.fi/~tkarvine/linux/doc/yum-signatures.html

 

And you might need this key from http://fedora.redhat.com/about/security/

 

Save them to text files with standard names like “RPM-GPG-KEY-fedora” and/or “FEDORA-GPG-KEY”.  The names aren’t really important.  Keys of this type are typically found in /usr/share/rhn, so move the text files there.

 

4.      IMPORT THE GPG KEYS

Import the gpg keys with something like (as root)

 

rpm –import FEDORA-GPG-KEY

 

NOTE: Don Hefferman reported a hiccup he experienced at this step. It’s not clear to either of us why he received import failures when attempting to import the keys as above.  At any rate, here is the text from his email regarding the fix:

 

When I copied various keys to my system I could not import them into the

rpm db.  They imported in gpg, but that did not make them available in

rpm, so I would get all the way thru the upgrade download and then crap

out when yum couldn't verify a package.  I finally solved it by

importing keys directly from fedora.us and livna using urls I found at:

http://fedora.artoo.net/faq/#GPGSig

 

The two I used were:

 

rpm --import http://www.fedora.us/FEDORA-GPG-KEY

rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY

 

 

 

 

5.      REMOVE PROBLEM RPMS

Before you crank up yum, you might need to remove a few rpms that were part of the standard Redhat 9.0 distribution but seem to no longer be part of Fedora.  If you don’t remove these, yum will croak, saying that some rpm could not be removed because it was required by something else. 

 

The one that gave me problems was lokkit.  It was required by redhat-config-securitylevel which was in turn required by firstboot. [Oddly I don’t find these dependencies on older RH8 systems.] These provide the gui which, allows one to configure a firewall on initial install.  I don’t think they’re needed after that, so I removed them with:

 

rpm –e firstboot

rpm –e redhat-config-securitylevel

rpm –e lokkit

 

[It’s possible lokkit is used by RedHat’s firewall GUI but since I don’t use the GUI, I’m not sure.]

 

6.      RUN YUM

Now, you’re about to run the upgrade. 

 

Yum is pretty slick.  It reads the rpm headers for the rpms installed on your system and compares them with those on the target distribution server.  Then it decides what should be upgraded, checks all the dependencies, adds whatever else you might require, and asks you if you’re happy with what it’s about to do.  If you say yes, it collects all the RPMs (they go in /var so make sure there’s some space) and then runs a test (of what I’m not sure) and then installs everything. 

 

At least until you get to the actual install stage at the end, yum seems quite robust.  I attempted upgrades several times as I figured out the details above, and yum never downloaded anything twice, and checked the integrity of everything, once even pitching a file that was only half downloaded and retrieving it again.

 

So execute yum with the following:

 

yum upgrade

 

or alternatively

 

yum –y upgrade > /tmp/upgrade.out  2>&1

 

The second version won’t prompt you before downloading and installing all the files, and will give you a nice log of what you’ve done.

 

Downloading the rpms didn’t take terribly long, but the install itself took a couple hours on my meager 750 MHz laptop. I have historically had occasional problems with the screen saver locking up the system, you might want to turn yours off before starting the upgrade.

 

Some Post Upgrade Notes:

After the upgrade and a normal boot to the Gnome desktop the next day, the up2date icon in the taskbar shows a blue check.  I clicked on this which opened the “Red Hat Network Alert Notification” and an announcement that my system “does not seem to be registered with the Red Hat Network”.  I wasn’t surprised, as I had not previously registered the system with RHN prior to the Fedora upgrade.  There was also a button to register, which I clicked.  Up2date was then run automatically, my system was scanned for updates.  In the process, up2date showed that I was registered to the fedora core channel and the yum release server I had configured in /etc/yum.conf was shown.  One out of date package was found (presumably released the night before) and I installed it.  None of this required logging into the RHN site, or pre-configuring an account.  So it seems that RHN is now freely available for keeping systems up to date without limits to time or systems. 

 

I do note however that a second click of the “check” icon resulted in the same turn of events (minus the package install) described above, that is, I still was not shown to be registered with RHN.  No Fear!  This is a known problem with the RHN applet that has been fixed in the latest version (but not yet part of Fedora).  This warning can safely be ignored.

 

One final thing left to do is to change /etc/yum.conf back to the original from http://www.xades.com/proj/fedora_repos.html.  This will ensure that after subsequent upgrades to the system, up2date efforts point at the correct update repository.