Published August 20th, 2005 by Jim O'Halloran

Upgrading Fedora Core 1 to CentOS 4.1

I’ve been contemplating an upgrade from Fedora Core 1 to CentOS for a while now. My server was originally installed with FC1 about 18 months ago, and runs Apache, PHP, DNS, sendmail/courier IMAP, and Samba, as well as acting as a NAT gateway and firewall for my home network.

An upgrade was on the cards for a number of reasons, firstly Fedora Core 1 is no longer supported, and secondly a long time ago I broke yum, which makes installing and maintaining packages more hassle than it needs to be. Finally, many of the packages for FC1 were starting to get a bit old. For example, I needed MySQL 4.x for a project I was looking at recently, but the FC1 package is the older 3.0.23 version.

I decided to move away from Fedora Core mainly because of its short support life. Its not a major hassle to reinstall/upgrade my laptop periodically, but I don’t want to be taking down my server too often for upgrades. I’ve got a client running CentOS and I’ve been very impressed with it, I’ve always used Red Hat distros, so that feels most comfortable for me, and CentOS feels just like RedHat to use and administer. CentOS is based on Red hat Enterprise, so the Red hat feel shouldn’t be a surprise, but the other nice thing is that it has an extremely long support life. CentOS 4 will be supported through until February 29, 2012! The combination of these factors made the move from Fedora to CentOS an easy decision.

So, how about upgrading then… Good news is that was painless also. The relevant question in the CentOS FAQ Suggests that the most reliable method for upgrading is to back up and reinstall. However, it also hints that an upgrade with yum is possible (although not for me, a broken yum is one of the reasons for reinstalling to begin with). However, also mentioned is a “linux upgradeany” switch available at the installer’s “boot:” prompt.

Now, my FC1 install is pretty vanilla. There’s 2 third party rpm’s installed, one was a new python RPM (which is what broke my old yum), and the other was courier-imap. The python RPM I wanted replaced during the upgrade, but I hoped the installed was going to leave my IMAP alone. Configuration of the various services had been customised extensively, and I didn’t want to loose that if possible.

Both Fedora and CentOS/RHEL have the same heritage, with regards to things like package names, etc, which should lessen the impact of naming conflicts (i.e. both Fedora and CentOS call the apache package httpd). Given that I was running an old Fedora, any package I had installed was likely to be older than the equivelent CentOS package. Upgrading from FC3 or 4 to CentOS could be more problematic because these newer distros might contain packages with later version numbers than the equivalent CentOS packages. The combination of package naming and versioning led me to beleive that an upgrade was viable.

So, with all that in mind, I decided to try an upgrade. Hwere’s what I did:

  • Download a burn a full set of CentOS install CD’s
  • Take a back up of all data on the server.
  • Boot from disk 1
  • Enter “linux upgradeany” at the “boot:” prompt.
  • Follow the installer through the rest of the process
  • Once completed, test all services to make sure they’re now working as expected.
  • Run “yum -y update” to being the machine fully up to date

After the upgrade there were a few minor problems

  • DNS (named) - My DNS configuration had been overwritten with the default caching name server config. This probably wasn’t surprising, however the old config file was still there as named.conf.rpmsave so a quick mv and a “service named restart” soon fixed that. Configurations for all other services seemed to be left as they were, so that was good.
  • yum unable to update - The second problem was equally as easy to resolve. When I ran “yum -y update” it was unable to download the list of mirrors from centos.org. The hint to the cause of the problem was the word “Null” in the URL where I would have expected to see the version of CentOS. Knowing that yum uses a -release package to obtain the distribution’s version I did a “rpm -qa centos-release” and found there was no centos-release package, however a second query revealed there was still a fedora-release. To fix I mounted CD1 and ran “rpm -Uvh –force centos-release*.rpm”, then “rpm -e fedora-release”. With the -release packages straightened out, yum worked perfectly.
  • IP Forwarding - I needed to edit /etc/sysctl.conf again to turn on IP forwarding. I’m not sure if this was replaced, or the method I was using before just didn’t work, either way, easily fixed.
  • mailman no longer worked - I’d installed mailman previously, and it no longer started after CentOS was installed. The error message indicated that it was related to Python versions (I installed the upgraded python originally on FC1 for mailman). I wasn’t using mailman anymore, so I simply disabled it.

So while there were a few problems, they weren’t significant. I was able to resolve all of them in under half an hour. Of course, its still not the recommended way to upgrade from Fedora Core to CentOS, but it worked for me. It may or may not work for you. Consider how recent the packages on your Fedora box are, if they’re later then the equivalent CentOS package, there could be issues with a mix of packages ufter the upgrade.

The above worked for me, YMMV.. Hope my first blog posting in 5 months helps someone else out. I’ve got a pile of stuff queued up to post, so hopefully I’ll post a bit more regularly from now on.


0 Responses to “Upgrading Fedora Core 1 to CentOS 4.1”

Feed for this Entry
  1. No Comments

Leave a Reply

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>