Convert a RHEL box to Scientific Linux with no downtime

I saw the following tweet today.

I was faced with the same task a couple years ago and discovered that it’s actually a lot simpler than you’d guess. (It helps that 99(.44)% of the code between the same versions of Red Hat Enterprise Linux, Scientific Linux, and CentOS is identical.) After determining the minimum number of packages I needed to remove, replace, or install, and in what order to do everything, I came up with the procedure detailed below. Once I tested it on a few boxes and was satisfied with the results, I handed the job off to puppet and it took care of converting the rest of my RHEL boxen to SL. (If you’re interested in seeing the puppet manifest I used to do this, let me know in the comments.)

Because I told him I would, I’m sharing the process I used to convert RHEL 6.x (x86_64) servers to SL 6.x. (If you’re not Jim Rispin, well, then I guess you can read it, too.) Like this blog title says, no reboots or downtime were necessary. We even did our conversion in the middle of a weekday with no noticeable impact. Let’s get going.

  1. Add Scientific Linux repositories to your RHEL box.
    • You can install yum-conf-sl6x-1-2.noarch.rpm from the SL6x repo to add SL6x (x86_64) public mirrors to yum.
    • Alternatively, create mirrors of the SL6x repos on your local network and point yum to those.
  2. Remove RHEL-specific repos:
    • /etc/yum.repos.d/os.repo
    • /etc/yum.repos.d/updates.repo
    • /etc/yum.repos.d/dag.repo
  3. Clear the yum cache
    yum clean all
  4. Install yum and redhat-logos packages from the SL6x repo.
    yum install yum redhat-logos
  5. Remove proprietary RHEL packages, but leave dependencies.
    rpm -e --nodeps --allmatches redhat-release redhat-release-server redhat-indexhtml
  6. Install branding packages from the SL6x repo.
    yum install sl-release sl-release-notes sl-bookmarks sl-indexhtml redhat-rpm-config
  7. Finally, replace all occurrences of “Red Hat Enterprise” with “Scientific” in the grub boot menu.
    sed -i -e 's|Red Hat Enterprise|Scientific|g' /boot/grub/grub.conf
  8. There is no step 8.

That’s really all there is to it.

Advertisements

2 thoughts on “Convert a RHEL box to Scientific Linux with no downtime

  1. Obviously for a server, Debian is the top choice. However I’m partial to OpenSUSE. when using ssh on terminal on my mac, I like the way that Yast turns into a sort of old style bios for administration.

Comments are closed.