Adding AHCI to centos initrd

Ever needed to add AHCI to a centos system after an install. A quick way to do it is just:

modprobe ahci
cp /boot/initrd-`uname -r`.img /boot/initrd-`uname -r`.img.bak
mkinitrd -f --with=ahci /boot/initrd-`uname -r`.img `uname -r`

UPDATE: on centos6 its now

modprobe ahci
cp /boot/initramfs-`uname -r`.img /boot/initramfs-`uname -r`.img.bak
mkinitrd -f --with=ahci /boot/initramfs-`uname -r`.img `uname -r`

cpanel + rrdtool not installing (new install)

Frequently I came across new cpanel installs not installing rrdtool correctly. The error would end at

Using catalogs: /etc/sgml/
Using stylesheet: /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#print
Working on: /usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0/doc/local-fontconfig-devel.sgml
nsgmls:(invalid location):E: invalid filename ""
rmdir: failed to remove `devel-man': Directory not empty
gmake[2]: *** [func.refs] Error 1
gmake[2]: Leaving directory `/usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0/doc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0'
gmake: *** [all] Error 2
child exited with value 2

To fix run
yum remove docbook-utils

CloudLinux Single mode

I’ve always had trouble getting into single mode in cloudlinux. Trying to type single would show up as gibberish. Looking at a server today, I accidentally came across a way around this, by hitting c (to go to the grub command line) and esc (to exit back). Once done I could use append (a). Previously append or edit did not work.

At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu.

type c (goes to grub command line) then hit esc

Select Cloud Linux with the version of the kernel that you wish to boot and type a to append the line.

type single and hit enter to boot

Send exim on another IP address, for a specific domain

I was looking for a way to send mail to one domain on an IP, and all other mail on another domain on another IP. The basic exim remote SMTP set up is


To switch the exim ip, the interface=IP.address configuration is used. But I wanted to have email to a particular domain go over another IP address. I came up with

interface = ${if eq {$domain}{REMOTE.DOMAIN.COM} {IP.TO.SEND.FROM}{DEFAULT.IP} }

OpenVZ Container Error

Ran into an issue where an openvz container would start up, but the networking would not. Running in verbose mode I saw

ifup-venet WARNING: Device list is empty

After looking around, searching the web I could not come up with anything. Then I saw the container had an /etc/vz folder. Turned out vzctl had got installed by the user on the openvz container, breaking networking. Removing this and a restart fixed the problem.