ORC Owl Logo 2  

Owl River Company

 
  Your IP is: 38.103.63.18

Red Hat Linux 8 to Red Hat Linux 9 Upgrade steps using 'yum'

  1. Start with a Red Hat Linux 8 installation; let's take a couple snapshots of what the system looked like 'before' in terms of installed packages:
    cd /root/ # rpm -qa | sort > /root/initial-package_with_versions.txt # rpm -qa --qf '%{name} \n' | sort \ > /root/initial-package.txt #
  2. IMPORTANT: Please, please make full backups of content on that system before starting. Good candidates to rsync to another host are:
  3. Let's say that again: You must take current backups. The most common cause of problems is running out of space, mid-upgade; if you have backups, it is usually just inconvenient. Without them, things can turn into a disaster. Please.

  4. Install the latest yum version from the home yum site ( http://linux.duke.edu/projects/yum/download.ptml ), along with (possibly if not already present) the librpm404 and rpm404-python requirements.

  5. Set up a place for the RHL 9 ISO contents to live for the upgrade; we are going to use the 'file' yum method for reliability and speed:
    mkdir /home/ISO/
  6. Successively mount the RHL 9 ISOs and cp /mnt/cdrom/Redhat/RPMS/* /home/ISO/
  7. Build the yum archive cd /home/ISO/ ; yum-arch .
  8. Edit /etc/yum.conf thus:

      [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest # assume-yes # exclude=-kernel [base] name=Red Hat Linux 9 base baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/9/i386/ [updates] name=Red Hat Linux 9 updates baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/9/ [upgrade] name=Localhost baseurl=file://localhost/home/ISO/  

  9. Do a test upgrade (note that will not proceede to completion, as we do not add the yum '-y' option.) yum upgrade
  10. If one get some problems about missing dependencies, we need to remove the parent packages out of the existing RHL 8 installaton for the moment; as a general rule, if one runs into dependency problems later on, pull the offending package out temporarily, and add it back once the upgrade is done. In our example, below, we assime that there is some problem involving 'ImageMagick':
    rpm -e `rpm -qa --qf '%{name}\n' | grep Image`
  11. Do the upgrade 'for real': yum -y upgrade
  12. Confirm that you have a RHL 9 kernel rpm -qa | grep kernel
  13. If absent, force a kernel in manually (Note: there are 'later' kernels from the RHL series present, so yum did not see fit to install the RHL 9 specific one; also, rpm with the '-i' option also thinks it is not correct to install a seemingly 'earlier' kernel.

    This is not correct in terms of our goal state, however, as RHL 9 marked a transition point for Red Hat (wherein they moved to an NPTL aware kernel). We need to get that kernel in place manually. cd /home/ISO/Redhat/RPMS/ ; ls kernel* [root@ftp RPMS]# rpm -qa | grep kernel kernel-2.4.20-18.8 kernel-2.4.20-28.8 [root@ftp RPMS]# ls ker* kernel-2.4.20-8.athlon.rpm kernel-pcmcia-cs-3.1.31-13.i386.rpm kernel-2.4.20-8.i586.rpm kernel-smp-2.4.20-8.athlon.rpm kernel-2.4.20-8.i686.rpm kernel-smp-2.4.20-8.i686.rpm kernel-bigmem-2.4.20-8.i686.rpm kernel-source-2.4.20-8.i386.rpm kernel-BOOT-2.4.20-8.i386.rpm kernel-utils-2.4-8.29.i386.rpm kernel-doc-2.4.20-8.i386.rpm [root@ftp RPMS]# rpm -ivh kernel-2.4.20-8.i586.rpm warning: kernel-2.4.20-8.i586.rpm: V3 DSA signature: NOKEY, key ID db42a60e Preparing... ########################################### [100%] package kernel-2.4.20-18.8 (which is newer than kernel-2.4.20-8) is already installed package kernel-2.4.20-28.8 (which is newer than kernel-2.4.20-8) is already installed [root@ftp RPMS]# rpm -ivh --force kernel-2.4.20-8.i586.rpm warning: kernel-2.4.20-8.i586.rpm: V3 DSA signature: NOKEY, key ID db42a60e Preparing... ########################################### [100%] 1:kernel ########################################### [100%] [root@ftp RPMS]# We also have to manually move the kernel headers to the RHL 9 version: [root@ftp RPMS]# rpm -e --nodeps glibc-kernheaders [root@ftp RPMS]# rpm -Uvh glibc-kernheaders-2.4-8.10.i386.rpm warning: glibc-kernheaders-2.4-8.10.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e Preparing... ########################################### [100%] 1:glibc-kernheaders ########################################### [100%] [root@ftp RPMS]#
  14. We manually edit the /boot/grub/grub.conf file to point to the RHL 9 kernel.

  15. At this point, we need to manually remove the old yum, and its dependencies; we will rebuild the rpm database as well, now: [root@ftp RPMS]# rpm -e rpm404-python librpm404-devel librpm404 yum warning: /etc/yum.conf saved as /etc/yum.conf.rpmsave [root@ftp RPMS]# rpm -vv --rebuilddb ... snip ... [root@ftp RPMS]#
  16. Now we reboot, as the proper glibc, and kernel need to be picked up before we update to the latest packages. We will rebuild the rpm database again, with that kernel and glibc. [root@ftp RPMS]# rpm -vv --rebuilddb [root@ftp RPMS]#
  17. And then we will manually get a yum-2 version from the Duke site, install it, and then update the system. [herrold@ftp herrold]$ lynx http://linux.duke.edu/projects/yum/download.ptml [herrold@ftp herrold]$ sudo rpm -Uvh yum-2.0.6-1.noarch.rpm Preparing... ########################################### [100%] 1:yum ########################################### [100%] [herrold@ftp herrold]$ sudo yum -y clean [herrold@ftp herrold]$ sudo yum -y update Gathering header information file(s) from server(s) ... snip ... [herrold@ftp herrold]$
  18. You may also also wish to manually clean away the transition content at: /home/ISO/ and /var/cache/yum/upgrades/

  19. We welcome reports and suggestions to: info+yum-89@owlriver.com
           

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

    Last modified: Sat, 19 Jun 2004 00:51:23 -0400
    http://www.owlriver.com/projects/yum/rhl8-to-rhl9/index.php