Once developers came to me asking for help tracking unknown disk activity on CentOS 5.2 - based development server. (Disk activity was there for ~20 minutes so everybody noticed a slowdown)

I thought it wouldn't be difficult using


command however it is not available from native repositories.

Then I tried

dstat -M topbio

and got

Module topbio failed to load.(Kernel has no I/O accounting, use at least 2.6.20)
None of the stats you selected are available.
That's right - recent release of CentOS 5.2 came with kernel (2.6.18) too old for using file IO monitoring. Of course no newer kernels available in repository. (If I'm not mistaken latest kernel at the moment of CentOS 5.2 release was 2.6.30.)

Too bad I have to work mostly with CentOS and RedHat instead of Debian. :(

The problem with CentOS and also with RedHat is not only that they are being released with outdated software packages but also with their release model. While targeted for servers and corporate environment it is surprisingly common to see a production RedHat server not being updated for several years because it is completely worthless trying to update it within its release and too risky trying to upgrade the whole box. Software in their repositories quickly becoming obsolete and installing something is a pain because it's

  • either too old or not in repository.
  • package need dependency which are not in repository (if you're lucky enough to get a package)
  • build environment is out of date so you cannot compile without installing an update and of course dependency required not in repository

That's it, the server has been configured once and forever ignoring all the security risks etc.

It is not completely hopeless though. One guy figured out how to install software into Debian chroot on Red Hat. Brilliant! Largest software repository in the world now can be used to improve hopeless servers. No more problems installing. Thanks so much for the idea!

His original instructions as of 2003 can be improved a little:

First we need to get current deboorstrap from http://packages.debian.org/testing/debootstrap

Then extract (first archive then application):

ar x debootstrap_1.0.20_all.deb data.tar.gz
tar -td data.tar.gz                     ##(optional, to list archive content)
sudo tar zxvf data.tar.gz -C /          #That's a bit rude way to install.

We should have use alien (which unfortunately not in native repository) to convert package from .deb to .rpm or get ready to use .rpm package somewhere. But for this purpose it might be acceptable and this is the easiest way.

Now we're going to create a Debian squeeze (current testing release) chroot in /opt/debian32 from Australian mirror.

Note: CentOS sudo has a notorious problem not appending proper PATHs for root commands. To overcome it we either need to specify missing PATHs for every sudo command either run the following commands as root.

sudo PATH=$PATH:/sbin:/usr/sbin /usr/sbin/debootstrap --arch=i386 squeeze /opt/debian32 http://mirror.optus.net/debian

(If being run as root 'sudo PATH=$PATH:/sbin:/usr/sbin ' part may be omitted)

Next logical stage might be a configuring mount points for chroot. Let's add the following lines to /etc/fstab.

proc    /opt/debian32/proc    proc    defaults    0    0
/tmp    /opt/debian32/tmp     none    bind        0    0

We can mount new mount points without reboot with

sudo mount -a

Lats thing to do is to find default locale on host system by

locale | grep LANG

and then create the same locale in Debian chroot:

apt-get install locales
dpkg-reconfigure locales    #if necessary

That's it - feel free to dive into Debian (chroot) and use your favourite applications easily even if it is too hard or impossible to install them on poor host distributions.