Linode Kernel Headers

kernelkernel-moduleslinodelinux-kernelr1soft

I am trying to install the Idera (R1soft) linux agent on a Linode running Ubuntu 12.04LTS. The agent requires a driver which in turn requires the kernel headers. Linode uses custom kernels though so the kernel headers I want are not in the apt-get repositories for ubuntu.

To the best of my knowledge linode tracks mainline so I logged into linode and changed my kernel from "latest" to a static version so it would not change on me on future reboots. Then I downloaded that version of the linux source from kernel.org and dropped it in /lib/modules. I pointed the agent install process at that directory but its still complaining it cannot find the headers.

Should I be downloading a different package that only includes header files? Are the headers a subfolder of the linux source? Am I just horribly off base in what I am trying to do here?

root@li372-176:~# serverbackup-setup --get-module --kernel-dir /lib/modules/linux-3.13.7
Checking if module needs updated
Checking for binary module
Waiting                       |
No binary module found
Gathering kernel information
Gathering kernel information complete.
Creating kernel headers package
Checking '/lib/modules/linux-3.13.7' for kernel headers
Unable to find a '.config'. This file is required to build a kernel module
Unable to find a valid source directory.
Please install the kernel headers for your operating system.
To install kernel headers execute:
apt-get install linux-headers-`uname -r`

Best Answer

This is old and has long since been solved but I just logged in for the first time in a long time and noticed it has no answer so I am providing one to add closure.

In order to install the r1soft kernel module or any kernel module on a linode you need to boot the linode from its own distribution supplied kernel not the shared (default) pv kernel. Even if you had the right headers you would not be able to load the module since this is a shared kernel that lives outside of your linode.

The short answer is to install the distribution kernel using your package manager, reconfigure grub to point at the kernel, configure the profile for your linode to boot using either pv-grub (xen) or GRUB2 (kvm), and reboot.

The following two articles detail how to do this in detail on a xen and kvm linode.

https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distributionsupplied-kernel-with-pvgrub

https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distribution-supplied-kernel-with-kvm

Related Topic