Compiling Oxford PCIe Serial Chipset Support into the Red Hat Enterprise Linux 5 Kernel

Serial ports are one of the last bastions of legacy technology struggling to hold on in the data center. If you happen to find yourself attempting to install an 8-port PCIe serial adapter — like the Startech PEX8S952 — based on the Oxford OXPCIe958 chipset, you have my sympathy. Unfortunately, while the serial drivers built into the latest Red Hat kernel work for the most part, they require a few minor modifications to interface correctly with this card and its Oxford-based brethren. Understand, however, that rolling your own RHEL kernel will render your system unsupported as far as Red Hat is concerned. If you encounter any issues, it’s likely that Red Hat support will require you to reboot and recreate the problem using an “official” kernel. Hopefully, these steps will save you some frustration.

 

yum -y groupinstall "Development Tools"
yum -y install ncurses-devel
mkdir -p /esupport/serial
cd /esupport/serial
wget -c http://www.startech.com/Data/ProductDrivers/PEX8S952.zip
unzip PEX8S952.zip
wget -c ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/kernel-`uname -r`.src.rpm
rpm -i kernel-`uname -r`.src.rpm
cd /usr/src/redhat/SPECS
rpmbuild -bp --target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee prep-out.log
cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/drivers/serial
patch -p0 < /esupport/serial/Linux/SW_Linux26_PCIe_Uart/Driver/expresso_linux2.6_uart
  • Depending on your terminal emulation, you may need to perform this next step using the local console or VNC
cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/
make menuconfig
  • Device Drivers -> Character Devices -> Serial Drivers
  • To adjust the number of serial ports enumerated at runtime, select “Number of 8250/16550 serial ports to register at runtime” and enter a suitable number (e.g. 8)
  • Once all changes have been made, exit back through the menus and select “Yes” to save the new .config file
make bzImage
make modules
make modules_install
make install
  • Edit the /etc/grub.conf file to point the boot loader at the new kernel (ex: Red Hat Enterprise Linux Server (2.6.18-prep))
vim /etc/grub.conf
  • Reboot to apply the new kernel

For what it’s worth, I’ve opened a request to add this patch to the kernel.

Forwarding CrashPlan Pro Traffic via Port 443

Here’s a tip for anyone hosting a CrashPlan Pro server and intending on having external clients back up via the Internet. Because it’s a fairly common practice to firewall strange and unknown traffic, port-forwarding traffic to the CrashPlan Pro backup service’s port (4282) over a known good port can be accomplished with the following iptables statement:

iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 4282

Additional information: CrashPlan Pro Network Requirements

Secure Backup One Liner

If you ever find yourself in a situation where you need to produce an encrypted, compressed backup archive, and you don’t have room to spare — or you just prefer the efficiency of pipes — here’s how in a single command.

To create a compressed backup of the directory “/home” that has been encrypted with AES and the secret key “mysecretkey” to the destination archive /tmp/backup.tar.gz.enc:  

tar cvf - ./home | openssl aes-256-cbc -salt -k mysecretkey | gzip > /tmp/backup.tar.gz.enc

To decrypt the compressed, encrypted archive created in the previous step: 

gunzip -c /tmp/backup.tar.gz.enc | openssl aes-256-cbc -d -k mysecretkey | tar xvf -

This is especially useful on UNIX platforms that don’t provide gzip with tar — AIX, for example.