ORC Owl Logo 2  

Owl River Company

  Your IP is:

Using a local 'upgradeany' to move from RHL 9, RHEL 3, RHAS 21, or cAos 1 to CentOS 4

We have used the 'upgradeany' kickstart option in CentOS 4, to migrate from RHL 9, RHEL 3, RHAS 21, or cAos 1 to CentOS 4. Here is how:

From herrold@owlriver.com Wed Apr 13 09:33:55 2005
Date: Wed, 13 Apr 2005 09:33:42 -0400 (EDT)
From: R P Herrold <herrold@owlriver.com>
To: Main Discussion List for KPLUG <kplug-list@kernel-panic.org>
Subject: Re: kplug] RHEL 3 upgrade to 4

On Wed, 13 Apr 2005, Mike Odegard wrote:

> Has anyone done this yet?

Yes - several times - I will have a writeup soon to go with my collection at:


which has several procedural hints to help 'skinny' down a host to help mazimize the prospects for a successful upgrade, and to guard against a failed upgrade.

But capsule form it is:
  1. Set up a local FTP mirror of the ISOS, using lftp:
    [root@ftp ~]# cat lftp-centos4-iso.conf_
    #	Get the Centos 4 ISOs
    mirror -e -c  \
            ftp://bugs.osu.edu/pub/Linux/Centos/4.0/isos/i386       \
    #         -I CentOS-3.4-i386-disc*                              \
    #         -I MD5SUMS                                            \
    with a command like: lftp -f lftp-centos4-iso.conf_
  2. And grab the updates as well, using lftp:
    [root@ftp ~]# cat lftp-Centos-40-updates.conf
    #       Get the Centos 4 updates
    mirror -c -e \
            http://mirror.centos.org/centos-4/4.0/updates/i386/RPMS \
    #       The following line is for our yum-arch and
    #       createrepo logic
    # yum: /var/ftp/pub/mirror/centos/centos-4/4.0/updates/i386/RPMS
    with a command in the crontab for root like:
    55 6 * * *	lftp -f /root/lftp-Centos-40-updates.conf 
    We actually use a more complex, site local script to do this, which also uses the content at: # yum: (etc) to also automatically update our yum-arch and createrepo yum archive headers. See the README at ftp://ftp.owlriver.com/pub/mirror/active-release/ for more gory details.
  3. Loop mount and hang them on a local host (not the one to be upgraded) for local FTP access

    See the code at:
    in install-from-iso.sh and ORCsetPXE
  4. As root, make a directory on the host to be upgraded, and retrieve the following files:
     	mkdir /boot/upgradeany/
     	cd /boot/upgradeany/
     	lftp (local mirror)
                get /pub/install/ftpinstall/images/pxeboot/*
    [herrold@centos-4 ~]$ lftp ftp
    lftp ftp:~> cd pub/install/ftpinstall/images/pxeboot/
    cd ok, cwd=/pub/install/ftpinstall/images/pxeboot
    lftp ftp:/pub/install/ftpinstall/images/pxeboot> ls
    lrwxrwxrwx    1 0        0              51 Apr 07 02:17 README
     	-> ../../../../loop/ftpinstall/1/images/pxeboot/README
    lrwxrwxrwx    1 0        0              55 Apr 07 02:17 
    initrd.img ->
    lrwxrwxrwx    1 0        0              52 Apr 07 02:17 
    vmlinuz ->
    lftp ftp:/pub/install/ftpinstall/images/pxeboot>
    which gets initrd.img and vmlinuz into that directory.
  5. Edit /boot/grub/grub.conf to add a stanza one thus:
    title upgradeany
             root (hd0,0)
             kernel /upgradeany/vmlinuz upgradeany
             initrd /upgradeany/initrd.img
  6. Reboot and boot option 1 rather than the default option 0.
  7. Answer the questions.
  8. Upgrade completed.
  9. Log in and get the updates in place:
     	cd /usr/share/doc/centos-release-4/
     	rpm --import RPM-GPG-KEY
     	rpm --import RPM-GPG-KEY-centos4
     	yum -y upgrade
  10. Make sure you are on the centos-announce mailing list.
  11. Please report issues or successes here or to me directly.

-- Russ Herrold

See also: Owl River Company - Yum hints -
     Red Hat Linux 8 to Red Hat Linux 9 Upgrade steps using 'yum'
     Red Hat Linux 7.3 to Red Hat Linux 8 Upgrade steps using 'yum'
     cAos-1 (base install) to CentOS-3 Upgrade steps
     Using yum to upgrade from Red Hat Linux 9 to CentOS 3.1

Updated 050428 for the changes in CentOS/cAos mirror structure.
Updated 060306 per a typo spot by Mark Lewis -- thanks

Back to Top Page
[legal] [ no spam policy ] [ Copyright] © 2008 Owl River Company
All rights reserved.

Last modified: Mon, 06 Mar 2006 21:38:41 -0500