3

I'm running a Xen based VM with CentOS 5, and my hosting provider pushes kernel version 2.6.37.6 from the host machine (so no pv-grub).

[root@dev ~]# uname -r
2.6.37.6

I'm trying to install the R1Soft agent, and I needed to build the hcpdriver module for it. Unfortunatelly yum install kernel-devel or yum install kernel-xen-devel didn't do the trick when I attempted to install the kernel headers needed to build the module (and i'm guessing it has to do with the fact that my hosting provider uses a custom kernel).

So I went ahead and downloaded the kernel from kernel.org, extracted it to /usr/src/ and ran:

zcat /proc/config.gz > .config
make oldconfig && make modules_prepare

Now that I had the kernel headers I built the hcpdriver module, but when I tried to modprobe/insmod it, I was getting the following error in dmesg

hcpdriver: no symbol version for module_layout

I googled the error and found some hints about vermagic. But my newly built module has the same vermagic as the previous module provided by my hosting provider (which apparently suffers from some kind of a bug and R1Soft support asked me to compile a newer version).

Here's the old -buggy- one (provided by my host):
[root@dev r1soft]# modinfo hcpdriver.o
filename: hcpdriver.o
version: 4.1.1 build 13785
license: Proprietary
description: Linux Hot Copy Driver
author: Michael Brumlow
depends:
vermagic: 2.6.37.6 SMP mod_unload modversions

and here's the new one I've build based on the newly compiled kernel headers:
[root@dev r1soft]# modinfo hcpdriver-cki-2.6.37.6.ko
filename: hcpdriver-cki-2.6.37.6.ko
version: 4.2.1 build 16433
license: Proprietary
description: Linux Hot Copy Driver
author: Michael Brumlow
depends:
vermagic: 2.6.37.6 SMP mod_unload modversions

As you can see vermagic is extactly the same. Problem is that the first module runs fine when I insmod it, but the second one doesn't.

Anybody ever had some kind of similar issue? It's the first time I built the kernel headers on my own, so I'm not quite sure if the process I used was the correct one in this case. Is there anything else I could try?

Update 1
I did the process from scratch again, redownloaded the tar.gz from kernel.org, untarred it into /usr/src/kernels and then ran:

zcat /proc/config.gz > .config
make
make modules_install && make headers_install

everything completed w/o errors.

then I ran:
r1soft-setup --get-module --no-binary
which also completed w/o errors, but now when I try to insmod the module, dmesg reports:
hcpdriver: disagrees about version of symbol __memcpy
hcpdriver: Unknown symbol __memcpy (err -22)

Thanks in advance, George

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
George Tasioulis
  • 1,969
  • 2
  • 16
  • 17
  • What is the setting of CONFIG_MODVERSIONS for the running kernel? If it is set your modules_prepare is insufficient. See http://askubuntu.com/questions/14627/no-symbol-version-for-module-layout-when-trying-to-load-usbhid-ko – Mark Wagner Mar 21 '12 at 01:35
  • I checked my .config file and it's CONFIG_MODVERSIONS=y. So I guess I need to build the full kernel and then build my module again? – George Tasioulis Mar 21 '12 at 14:03

1 Answers1

1

No, I've never seen the issue. But it sounds messy. This may be a hosting support issue. If the host pushes a specific kernel version and they manage the R1Soft install, shouldn't the host have a working hcp module available or be able to walk users through the steps needed to get things working? If anything, you can try hcp-setup and upload the relevant info to R1Soft's build servers. I've never had to build the module locally, but I'm usually on distro kernels or slightly-modified distro kernels.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • Yeap, I was also expecting them to provide the updated module (or at least some information on how to build it), since they push their own specific kernel, then again I purchased my R1Soft license from somewhere else. Anywayz... – George Tasioulis Mar 21 '12 at 14:07
  • The hosting provider helped me out after all. Their pushing kernel version 3.0.22 now and build the latest r1soft kernel module for me. – George Tasioulis Apr 05 '12 at 08:30