Posts List

Installing stock CentOS kernel on an OVH or Kimsufi server

I recently signed up for a small dedicated server at Kimsufi.co.uk for the grand price of £14 a month which I think is pretty good price for what you get. Brand Intel Model Celeron / Atom Frequency 1.20+ GHz Architecture 64 bits NIC FastEthernet Memory 2 GB Hard disk 1 TB FTP Backup 100 GB Bandwidth Heaps more than I need :-) The machine itself is nothing special but they do have remote management and you can install a variety of Linux and Windows operating systems. I am quite happy with their service and management tools but I wasn't happy with the fact that they run their own custom kernels on them. The kernel that they install is a 'grsec' hardened 3.2 kernel but this caused a variety of issues when doing 'yum update', mainly dependency issues. I Googled around and found a few different solutions on remotely installing CentOS which were all basically variations on the way I describe in a previous post using [grub to re-install](http://www.thegoldfish.org/2009/12/reinstall-centos-using-grub/). Whatever I tried with this including [using VNC](http://forum.ovh.co.uk/showthread.php?t=4991) and attempting a fully automated install with a tested kickstart file it would become unresponsive when rebooting into the OS the first time. Instead of all these methods I should have been thinking inside the box instead of outside it :-(

Set txqueuelen on virtual vnetX devices with libvirt

The txqueuelen is a value in the kernel on network interfaces that sets the transmit queue length. This value can be tuned for different work loads. In the case of modern networking the defaults can sometimes be changed to get better line speeds over ethernet. Most people will do this using a rc.local command to set it on the physical ethX devices like this. vim /etc/rc.local Add the following /sbin/ip link set eth0 txqueuelen 2500 This is a perfectly reasonable way of doing it but what happens when network interfaces appear after boot and the name is unknown before hand? This is exactly what happens with Libvirt vnetX interfaces. Ideally we would be able to get Libvirt to tune these interfaces when it creates them, but that level of control is yet to be implemented BZ#809172. Libvirt >= 0.8.0 has some hooks which enable you to run commands at specific times in the lifecycle of a guest which may be good for this but on RHEL 5 Libvirt is version 0.6.0 so I needed a different solution.

Linux network bond without restarting the network

This is quite handy to know if you need to create a new network bond on a live system without disrupting traffic. First of all create your bond configs in the normal way so that in the event of a reboot it will come back up working. See the Redhat documentation for how to do it in RHEL6. Now because we cannot just restart the networking to bring that up we need to construct it by hand. Let’s say our 2 interfaces we wish to bond are eth3 and eth4 and the bond we are going to create is bond1

Reinstall CentOS using grub

This post is here mainly because I always forget how to do it. This is one of the simplest ways to reinstall a Centos (will probably work for RHEL and maybe even Fedora) system without needing PXE or physical access to the machine. Make sure that you have tested your kickstart before you use it and don’t blame me if anything goes wrong. Save the following script and make it executable then run it. It will ask some questions about networking and hostname and then write a new grub stanza to your grub.conf. It will also download the correct kernel and initrd from the information you have given it and put them in the correct position for grub to find them when it boots.