Blog |Follow Nick on Twitter| About

There are somethings that you just never get round to, my nagios box was still running whitebox linux, and I've finally gotten round "upgrading" it to CentOS... yeah ok, upgrade is arguable, but you get my point.

First off a warning: Don't do this ! All the documentation, for CentOS, RHEL, Fedora, any redhat linux all say, clean installs are the best way, and upgrades are not advised.... therefore I offer no support or warranty that this will work, in fact, I you advise you to read this post, but step away from your consoles !

But, if you think it might be a laugh, the centos documentationis a bit old, and not 100% correct, so here is what I did. First up (as root - obviously), clear out your yum cache,and install the CentOS gpg key.

yum clean all
rpm --import

Next, install some base centos packages, take not that some need to be forced on

rpm -Uvh --nodeps
rpm -ivh
rpm -ivh
rpm -ivh
rpm -Uvh --force
rpm -Uvh --nodeps

finally remove the whitebox rpm db.

rpm -ev rpmdb-whitebox

Move any "whitebox" mirrors still in /etc/yum.repos.d and

yum install rpmdb-CentOS

Once you have that sorted, you can complete the upgrade with

yum update

& cross your fingers ;)
If you come across the following warnings while using yum: Warning, could not load sqlite, falling back to pickle , I found...

yum install python-sqlite

Fixed the problem. And there we have it, all my boxes are now running CentOS - yay - just in time to look at the CentOS 5 upgrade ;)

Dependency Problems ?
If a whitebox rpm is newer than the CentOS one, it won't get upgraded, this might cause problems when installing new packages via yum. To solve the problem download the rpm manually from and force an upgrade

rpm --force -Uvh Something-CentOS.rpm

UPDATE: If you're using something like Root Kit Hunter, you will notice a load of md5 hashes fail, these are whitebox rpm's that didn't need upgrading, to correct the problem you need to replace these with CentOS versions.. example rkhunter output:

/sbin/init  [ BAD ]

Find which rpm, init belongs to

# rpm -q --whatprovides /sbin/init

and upgrade it

rpm --force -Uvh SysVinit-2.85-34.3.i386.rpm


Nick Bettison ©