Cobalt RAQ3/4 Upgrade to BlueOnyx 5106R (Centos 5.8)

Foreword

This document describes how to upgrade Cobalt RaQ3 and RaQ4 web server appliances to the modern BlueOnyx 5106R hosting platform on CentOS 5.8. This document is specific to the RaQ3 and RaQ4 models with AMD K6 CPUs, which require a different kernel version than newer RaQ models (550, XTR).

This document is a slightly modified version of George Hall's instructions for upgrading RaQ550s to BlueOnyx, so if you have a RaQ550 or XTR, follow George's instructions instead of these. Thank you George (aka Mr. Webcam)!

NOTE: We make no warranties expressed or implied regarding these instructions. If you choose to follow them, you are on your own. We have used this exact process to successfully upgrade Cobalt RaQ3, RaQ3i, and RaQ4 servers to BlueOnyx 5106R, though your mileage may vary. You do realize that the performance of the old RaQ servers is not going to be anywhere near on par with a new server machine, right? We are talking about hardware that is at least a decade old here people! However, if you've got an old RaQ3/4 kicking around and a couple hours to spare, you can upgrade those old machines to a current and actively supported hosting platform in BlueOnyx. The links in this document were active as of November 6, 2012.

Overview

This method entails installing Strongbolt 1 on the RaQ to get it onto the CentOS 4.x release, then upgrading to the latest CentOS 5.x release, then installing the BlueOnyx hosting platform from the installation tarball. This process will take a couple hours, but can easily be tended to while you are doing other things as long stretches will be devoted to automated yum updates.

Prerequisites

In order to complete this process you will need the Strongbolt 1 CD from OSOffice or from a reseller. The version I used for this process was 1.06.03. You will need a PC to boot from the Strongbolt CD to act as the Strongbolt installation server, and an ethernet crossover cable to connect the Strongbolt install server PC to the Cobalt RaQ.

STEP 1: Upgrade from Cobalt OS to Strongbolt 1 OS

I recommend that you start with a fresh install of Strongbolt1 WITHOUT Bluequartz for this upgrade. If you have already upgraded your RaQ to Strongbolt with BlueQuartz AND you want to save the user/site data on that server, then I suggest you: If you do not need to save anything on the SB/BQ server, or you are still running the original Cobalt OS on your RaQ3/4 then just go ahead and install Strongbolt1 which will wipe out everything and start from scratch. NOTE: It is a wise thing when installing Strongbolt1 to "sudo editparts" and make sure that your ./ partition is as big as possible as this will fill up quickly.

Follow the Strongbolt1 installation process using a crossover ethernet cable. Those instructions are not repeated here. Take care to update the Cobalt ROM carefully, making sure you check for the ROM chip type as directed. We had some machines with Intel ROMs and some with AMD ROMs, so make sure you check and do not just assume!

When prompted on the RaQ LCD to "Install Strongbolt yes/no" choose Yes. When next prompted to "Install BlueQuartz yes/no" choose NO. This will install the base Strongbolt OS but not the BlueQuartz hosting platform. This saves a lot of time and makes the update process simpler since we will be installing the modern and actively maintained BlueOnyx hosting platform later on in this process anyway.

When the SB1 installation is complete, use the terminal window on the Strongbolt install server PC to reboot the RaQ:

ssh -l root 192.168.0.254

Type in "yes" to answer the question, it requires "yes" and not just "y". Enter the password "admin"

shutdown -rf now

At this stage I disconnect the crossover cable between the RaQ and SB install PC and connect the RaQ to my internet router so that the RaQ will now have an internet connection for updates, and so it will get a new LAN DHCP address.

STEP 2: Update Strongbolt 1 OS CentOS 4.x to CentOS 4.9 Final

Log in to the RaQ using ssh with user root and password admin.

Since the CentOS 4.x release was EOLed some time ago, the standard yum repositories are no longer available. So, we must grab the CentOS 4.x repo data from the CentOS Vault servers:

cd /etc/yum.repos.d
rm *.repo
wget http://vault.centos.org/4.9/CentOS-Base.repo

And now we can go ahead and update CentOS on the RaQ up to the final 4.9 release:

yum -y update

Next we must make sure none of our core binaries, libraries or other content is set immutable as this will cause a package to fail on installation. Let's create a /home/bxup subdirectory to hold some update files we need, then run the following package to take care of unsetting the immutable bit. This package was copied from George Hall's site:

mkdir /home/bxup
cd /home/bxup
wget http://www.thackernet.com/RaQtoBX/disable.les.rpmpkg
sh disable.les.rpmpkg

Once that is done we should go ahead and have a quick run through of cleaning up yum cache, double check that any pending updates are installed and rebuild the rpmdb:

rpm --rebuilddb

If for some reason the rpm rebuild hangs for more than a few minutes then you may need to manually clear the rpmdb files:

rm -f /var/lib/rpm/__db.00*
rpm --rebuilddb

Now the final yum update to make sure all pending updates are done:

yum clean all
yum update

STEP 3: Prepare to upgrade from CentOS 4.9 Final to CentOS 5.8

Here's where there is an important difference in the upgrade process for RaQ3/4 machiens compared to the RaQ550: the RaQ3 & RaQ4 machines with AMD K6 processors require a kernel built for the i586 platform and not the i686 platform that is used for the RaQ550s. It took several days but I finally found an appropriate Linux 2.6.18-164 kernel compiled for the i586 platform from this repository:
http://infocs.ru/rpmrepo/i586/
This kernel was compiled by Dmitry Mikhailov (thank you Dmitry!) which I found via this CentOS developer forum posting: http://lists.centos.org/pipermail/centos-devel/2011-June/007712.html

I took the CentOS-5up package from George Hall's site and updated it to replace the i686 kernel with the i586 kernel from the infocs.ru repository. This package contains the needed packages for the CentOS 4.x to 5.x upgrade in addition to a few needed to resolve dependency conflicts. Download it now into our /home/bxup update directory, and then install the files from the package:

wget http://www.thackernet.com/RaQtoBX/CentOS-5up-i586.tar.gz
tar xvfz CentOS-5up-i586.tar.gz
cd CentOS-5up-i586

Next we need to go ahead and setup the centos-release package as follows:

rpm -Uhv centos-release-*

If you see that CentOS-Base.repo was created as /etc/yum.repos.d/CentOS-Base.repo.rpmnew then go ahead and move it into the proper place:

mv /etc/yum.repos.d/CentOS-Base.repo.rpmnew /etc/yum.repos.d/CentOS-Base.repo

Now we are ready to go with kernel changes, this is an important part so pay attention. The key to successful upgrade is that you remove ALL OLD KERNELS as many packages will fail to install during the upgrade if they detect a release 4.x kernel due to minimum kernel version dependency checks. We will start with first installing the new i586 kernel:

rpm -ivh kernel-2.6.18-164.15.1.el5.infocs.i586.rpm kernel-devel-2.6.18-164.15.1.el5.infocs.i586.rpm --nodeps

Next remove a couple packages to resolve dependencies with this command:

rpm -e $(rpm -qa | grep kernel | grep -v 2.6.18 | tr '\n' ' ') lm_sensors net-snmp net-snmp-utils

That said and done you should now only have 2 kernel packages installed which are the 2.6.18 release 5.x kernels for i586. DO NOT under any circumstance continue if you still have 2.6.9 release 4.x kernels packages installed, remove them before proceeding! Let's confirm:

rpm -qa | grep -i kernel

which should report the following:

kernel-2.6.18-164.15.1.el5.infocs
kernel-devel-2.6.18-164.15.1.el5.infocs

There is a known bug with python-elementtree package versions which cause yum/rpm to think the release 4.x version is newer than the 5.x version, to get around this without blowing up the entire python installation we need to remove the package from just the rpmdb as follows:

rpm -e --justdb python-elementtree --nodeps

STEP 4: Yum Upgrade from CentOS 4.9 Final to CentOS 5.8

We can now go ahead and use yum to upgrade from CentOS 4.9 to 5.x. This process will take quite some time as there are hundreds of packages requiring hundreds of megabytes to download and install.

yum clean all
yum upgrade

Once yum has completed (hopefully without major errors) we need to fix a few things, the first is the rpmdb needs a rebuild due to version changes that will cause any rpm commands to fail. This can be fixed by running the following to manually rebuild the rpmdb:

rm -f /var/lib/rpm/__db.00*
rpm --rebuilddb
yum clean all

The next issue on the list is python-elementtree and python-sqlite, one or both of these may have ended up in a broken state that will cause yum commands to break, so we will go ahead and reinstall both of these for good measure:

rpm -e --justdb python-elementtree --nodeps
rpm -ivh python-elementtree-1.2.6-5.el5.i386.rpm
rpm -ivh python-sqlite-1.1.7-1.2.1.i386.rpm --nodeps --force

The yum command should now work, go ahead and run it with no options, if you do not get any errors you are all sorted.

Hopefully the install went well for you, the only thing left to do is go ahead and reboot the system:

shutdown -rf now

STEP 5: Install BlueOnyx 5106R hosting platform from the tarball

Login to your CentOS5 server via SSH as "root" with password "admin".

Run the following commands to enable quotas and build the quota file.

/bin/mount -o remount /home
/sbin/quotacheck -cuga
/sbin/quotaon -au

Then use your favorite text-editor to edit /etc/fstab to enable user- and group-quota. I use the "nano" text editor:
nano -w /etc/fstab

Please at this point make sure that your /etc/fstab file looks like this example:

/dev/md1 / ext3 defaults 1 1
/dev/md2 /var ext3 defaults 1 2
/dev/md3 swap swap defaults 0 0
/dev/md5 /tmp ext3 defaults 1 2
/dev/md6 /home ext3 defaults,usrquota,grpquota 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs noexec,nosuid,rw 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0

It is a good idea to reboot after making that change, so go ahead and reboot:

reboot

Once its rebooted log into your server again via SSH as "root" and password "admin". Now we'll download and install the BlueOnyx 5106R tarball:

cd /home/bxup
wget http://devel.blueonyx.it/pub/BlueOnyx/TAR/BlueOnyx-5106R-CentOS5-i386-20110617.tar.gz

Extract the tarball and change into that new extracted folder:

tar zxvf BlueOnyx-5106R-CentOS5-i386-20110617.tar.gz
cd BlueOnyx-5106R-CentOS5-i386-20110617

Now run the provided installation script. This is going to take quite a while as there are many automated updates to download and install as a part of the installation:

./install.sh

This script will perform the required steps to install BlueOnyx. For this it installs a few selected RPMs that it brought aboard (mainly the YUM repository files for BlueOnyx). Then it will "yum update" your CentOS5 install and will (through YUM) fetch all required RPMs from the YUM repositories to install BlueOnyx.

At the end of the install it will perform some post-install actions to enable all required services and to set up BlueOnyx in a fashion that it is useable right away. What I have found when installing to the RaQ3/4 machines is that at the end of this process you will see an error message that it has failed to create a user "admin" and that there is something wrong. Do not worry, this is normal, and everything has installed just fine. However, the web based setup routine that normally follows will not run successfully at this point. We need to reboot the server once again at this point:

reboot

When the server reboots, watch the LCD panel. Wait until you see it finally display an IP address, and at that point you can connect to the IP address of your server with a web browser and finish the initial web based setup.

http://your.server.IP/

Once the web based initial setup has finished, your new BlueOnyx server is ready for usage!

There is one small bug in the post install scripts in the tarball, which causes the System Information GUI option to fail with a phpsysinfo error message. This is easily fixed. SSH into your server with user "admin" and the new password you set as a part of the web based setup. By default SSH root logins are disabled (you can change that from the Network Services > Shell settings page). So, log in via SSH, su to root, and fix this phpsysinfo error:

su -
cd /usr/sausalito/ui/web/base/phpsysinfo/.phpsysinfo/
cp config.php.5106R config.php

At that point you can safely delete the bxup installation directory if desired (not required):

cd /home
rm -R bxup

That's it, you're done! Congratulations, and enjoy BlueOnyx on your RaQ3/4 server!

This procedure has been personally used on the following hardware: David Thacker
Thacker Network Technologies Inc.
2012-11-06