NOTE:
1. This is not a supported upgrade path !
The Server CD series mentioned here does not exist in all CentOS releases, nor in each point level respin. The CentOS team strives to permit minimal installs with just CD 1 of a given series, but this is not always possible. Please check the Release Notes for a given Major and Point release for further details.
You have to force an install of python-sqlite from the CentOS 5 repositories after the upgrade, as the version number of python-sqlite didn't change between 4 and 5.
rpm -Uvh --replacepkgs python-sqlite-1.1.7-1.2.1.i386.rpm
Otherwhise you'll get the error
Could not find any working storages
or
There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named sqlite Please install a package which provides this module, or verify that the module is installed correctly. It's possible that the above module doesn't match the current version of Python, which is: 2.4.3 (#1, Mar 5 2011, 21:25:56) [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq
2. Always have a current backup of you data !
This is a "general" guideline for a CentOS 4.4 Server CD install upgrade via yum.
YMMV with additionally installed RPMS and RPMS from third party Repositories.
I did a fresh install of the x86_64 Server 4.4 CD (everything) for this migration test.
Now that I have a CentOS 4.4 install, I will begin the migration to CentOS 5 via yum.
Start the upgrade process
mkdir /tmp/Upgrades cd /tmp
Check for centos-yumconf
rpm -qi centos-yumconf
* If centos-yumconf exist, remove it.
* NOTE this seems to be only installed if you installed from the x86_64 version of the ServerCD 4.4 ISO.
rpm -e centos-yumconf
Installing needed RPMS manually
I used wget to acquire the RPMS.
Install centos-release-5-0.0.el5.centos.2.x86_64.rpm centos-release-notes-5.0.0-2.x86_64.rpm
rpm -Uvh centos-release-5-0.0.el5.centos.2.x86_64.rpm centos-release-notes-5.0.0-2.x86_64.rpm
# Make sure you disable all other repos and only have CentOS Base and Updates repositories enabled.
Install the CentOS 5 GPG Key
# Get the GPG key from a mirror or CentOS 5 media.
rpm --import http://mirrors.kernel.org/centos/RPM-GPG-KEY-CentOS-5
cd /tmp/Upgrades
Download the following RPMS
# This gets the new yum/rpm working.
- rpm-libs-4.4.2-37.el5.x86_64.rpm
- rpm-4.4.2-37.el5.x86_64.rpm
- yum-3.0.5-1.el5.centos.2.noarch.rpm
- rpm-python-4.4.2-37.el5.x86_64.rpm
- popt-1.10.2-37.el5.x86_64.rpm
- glibc-2.5-12.x86_64.rpm
- glibc-common-2.5-12.x86_64.rpm
- beecrypt-4.1.2-10.1.1.x86_64.rpm
- glibc-headers-2.5-12.x86_64.rpm
- glibc-devel-2.5-12.x86_64.rpm
- binutils-2.17.50.0.6-2.el5.x86_64.rpm
- elfutils-libelf-0.125-3.el5.x86_64.rpm
- elfutils-0.125-3.el5.x86_64.rpm
- elfutils-libs-0.125-3.el5.x86_64.rpm
- beecrypt-python-4.1.2-10.1.1.x86_64.rpm
- python-2.4.3-19.el5.x86_64.rpm
- python-devel-2.4.3-19.el5.x86_64.rpm
- python-elementtree-1.2.6-5.x86_64.rpm
- python-sqlite-1.1.7-1.2.1.x86_64.rpm
- python-urlgrabber-3.1.0-2.noarch.rpm
- neon-0.25.5-5.1.x86_64.rpm
- libxml2-2.6.26-2.1.2.x86_64.rpm
- libxml2-python-2.6.26-2.1.2.x86_64.rpm
- db4-4.3.29-9.fc6.x86_64.rpm
- libselinux-1.33.4-2.el5.x86_64.rpm
- libsepol-1.15.2-1.el5.x86_64.rpm
- mcstrans-0.1.10-1.el5.x86_64.rpm
- m2crypto-0.16-6.el5.1.x86_64.rpm
- krb5-libs-1.5-17.x86_64.rpm
- openssl-0.9.8b-8.3.el5.x86_64.rpm
- readline-5.1-1.1.x86_64.rpm
# Install above RPMS
rpm -Uvh *.rpm --nodeps
# Clean and rebuild rpmdb for CentoS 5
rm -f /var/lib/rpm/__* rpm --rebuilddb
# Clean yum files
yum clean all
# Remove deps/outdated packages
Note: You can run yum upgrade to help find deps that you need to remove.
rpm -e VFlib2 caching-nameserver autofs kudzu pcmcia-cs xorg-x11 newt-perl hal crypto-utils --nodeps
Install new CentOS 5 kernel
# If you are getting the new kernel via wget you need to do the following first.
yum upgrade wget
rpm -ivh kernel-2.6.18-8.el5.x86_64.rpm --nodeps
Remove old CentOS 4 kernel(s)
rpm -qa | grep kernel
remove 2.6.9 bits
rpm -e kernel-2.6.9-42.EL kernel-devel-2.6.9-42.EL kernel-doc-2.6.9-42.EL
Upgrade the system to CentOS 5
yum upgrade
# Install removed packages that were not reinstalled
yum install caching-nameserver autofs
cd /tmp
# Generate list of RPMS on the system after upgrade to see what old RPMS are left
rpm -qa >Upgrade_RPM_List
# Reboot system
reboot
# Login and you should be on CentOS 5
uname -a
Linux localhost.localdomain 2.6.18-8.1.1.el5 #1 SMP Mon Apr 9 09:43:24 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
At this point you will need to start upgrading any extra/third party RPMS.