How to Migrate from White Box Linux 4 to CentOS 4.4

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 documentation is 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 http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4

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

rpm -Uvh --nodeps http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/centos-release-4-4.2.i386.rpm
rpm -ivh http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-4.2.1.i386.rpm
rpm -ivh http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.i386.rpm
rpm -ivh http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/sqlite-3.3.3-1.2.i386.rpm
rpm -Uvh --force http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uvh --nodeps http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/yum-2.4.3-1.c4.noarch.rpm

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
reboot

& 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 http://www.centos.org/modules/tinycontent/index.php?id=13 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
SysVinit-2.85-34.3

and upgrade it

wget http://www.mirrorservice.org/sites/mirror.centos.org/4.4/os/i386/CentOS/RPMS/SysVinit-2.85-34.3.i386.rpm
rpm --force -Uvh SysVinit-2.85-34.3.i386.rpm

Network Card Teaming on LINUX (How to)

Maybe it’s just me, but I found it incredibly hard to find how to NIC Teaming in linux similar to compaq network card teaming.

Now I’m fully aware that hp provide an official “pack” (Google Search Results Here), but what if you don’t have a supported server ? – Like me ! I’ve actually got an old hp netserver lp1000r.

Well after an age of searching, I found redhat’s page on the issue. , it was the usual scenario, if you don’t know the right word, how can the search engine find it ?

For those that just want to get it working, below are the 3 config files you need ( Save them in /etc/sysconfig/network-scripts/) once you’ve created them add

alias bond0 bonding

to /etc/modules.conf

ifcfg-bon0

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.2.0
NETMASK=255.255.255.0
IPADDR=192.168.1.1
USERCTL=no

ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

ifcfg-eth1

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

Once I’d updated modules.conf & created the above files I did a reboot (to ensure bond0 get loaded into the kernel) . When the box finishes rebooting you’ll have a load balanced team. In my case a 200mb Ethernet connection :cool:

[nick@WhiteBox nick]$ ifconfig -a
bond0     Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:373134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:274144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:38984323 (37.1 Mb)  TX bytes:37004178 (35.2 Mb)

eth0      Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:186460 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19476584 (18.5 Mb)  TX bytes:18475825 (17.6 Mb)
          Interrupt:11 Base address:0x1800 Memory:fb001000-fb001038

eth1      Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.2.101  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:186674 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19508259 (18.6 Mb)  TX bytes:18530361 (17.6 Mb)
          Interrupt:11 Base address:0x1840 Memory:fb003000-fb003038

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:698888 errors:0 dropped:0 overruns:0 frame:0
          TX packets:698888 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:80164429 (76.4 Mb)  TX bytes:80164429 (76.4 Mb)

XFCE 4.2.2 Released

XFCE 4.2.2 has been released, and to be honest I’ve struggled to get the rpm rebuilds done… just no time :’( !

Anyway the official announcement was here

http://foo-projects.org/pipermail/xfce-announce/2005-May/000021.html

You can update your whitebox installation using [LINICKX].com ! Check that you have something like this in your /etc/yum.conf

[LINICKX]
name=LINICKX Yum Repo
baseurl=http://www.linickx.com/files/rpm/whitebox/xfce-repo/

Then… from a shell do:

root@localhost # yum update xffm\* xfwm4\* xfce\* xfdesktop

…and your done :cool: