To compile kernel modules on a Cloud Server you need to complete the following steps, making sure to change the kernel version and directories where appropriate (–for example, 2.6.33.5-rscloud extracts to linux-2.6.33.5, whereas 2.6.35.4-rscloud extracts to 2.6.35.4-rscloud).

  1. Grab the patched kernel source for your kernel from the repository (check your kernel version with uname -a).
    wget http://kernel.slicehost.com/2.6.35.4-rscloud/patched_source/2.6.35.4-rscloud.tar.gz
  2. Extract the kernel to /usr/src.
    sudo tar xpf 2.6.35.4-rscloud.tar.gz -C /usr/src
  3. Create a link to /usr/src/linux and link to build in /lib/modules
    sudo rm -rf /usr/src/linux
    sudo ln -s /usr/src/2.6.35.4-rscloud /usr/src/linux
    sudo rm -rf /lib/modules/2.6.35.4-rscloud/build
    sudo ln -s /usr/src/linux /lib/modules/2.6.35.4-rscloud/build
  4. Create the configuration file and prepare the modules
    zcat /proc/config.gz | sudo tee /usr/src/linux/.config > /dev/null
    sudo make oldconfig
    sudo make modules_prepare
    sudo make INSTALL_HDR_PATH=/usr headers_install
    

If all went well you can now build custom kernel modules.

« »