1

I have already made a couple of tries in the last few days trying to install and run sysdig in Armbian 5.0/Debian Jessie 8.0, in my Lamobo R1.

After installing it with:

apt-get install -t jessie-backports sysdig sysdig-dkms dkms 

When running it gives the following error:

# sysdig
Unable to load the driver
error opening device /dev/sysdig0. Make sure you have root credentials and that the sysdig-probe module is loaded.

In the first try a few days ago I noticed the module was not being place in /lib/modules/4.4.1-sunxi/updates/dkms/sysdig-probe.ko and commented the include of asm-offsets.h in /var/lib/dkms/sysdig/0.5.1/build/main.c.

I also had to run make scripts in the kernel directory /usr/src/linux-headers-4.4.1-sunxi.

After this, I run /usr/lib/dkms/dkms_autoinstaller start and the module was compiled. However when running the error is the same.

Running insmod says:

#insmod /lib/modules/4.4.1-sunxi/updates/dkms/sysdig-probe.ko
insmod: ERROR: could not insert module /lib/modules/4.4.1-sunxi/updates/dkms/sysdig-probe.ko: Invalid module format

Running modinfo:

modinfo /lib/modules/4.4.1-sunxi/updates/dkms/sysdig-probe.ko 

Outputs:

filename:       /lib/modules/4.4.1-sunxi/updates/dkms/sysdig-probe.ko
author:         sysdig inc
license:        GPL
depends:        
vermagic:       4.4.1 SMP mod_unload ARMv7 p2v8 
parm:           max_consumers:Maximum number of consumers that can     simultaneously open the devices (uint)
parm:           verbose:Enable verbose logging (bool)

So obviously the module is with the wrong kernel version.

Now even when installing, it says:

#apt-get install -t jessie-backports sysdig sysdig-dkms dkms 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
sysdig is already the newest version.
The following NEW packages will be installed:
  dkms sysdig-dkms
0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded.
Need to get 0 B/137 kB of archives.
After this operation, 821 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Selecting previously unselected package dkms.
(Reading database ... 72251 files and directories currently installed.)
Preparing to unpack .../dkms_2.2.0.3-2_all.deb ...
Unpacking dkms (2.2.0.3-2) ...
Selecting previously unselected package sysdig-dkms.
Preparing to unpack .../sysdig-dkms_0.5.1-1~bpo8+1_all.deb ...
Unpacking sysdig-dkms (0.5.1-1~bpo8+1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up dkms (2.2.0.3-2) ...
Setting up sysdig-dkms (0.5.1-1~bpo8+1) ...
Loading new sysdig-0.5.1 DKMS files...
First Installation: checking all kernels...
Building only for 4.4.1-sunxi
Building initial module for 4.4.1-sunxi
Done.

sysdig-probe:
Running module version sanity check.
  - Original module
    - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.1-sunxi/updates/dkms/

depmod....

DKMS: install completed.

And again, sysdig-probe.ko, despite the message it is being compiled to 4.4.1-sunxi, is being compiled for the 4.4.1 kernel and not 4.4.1-sunxi.

My uname -r output: 4.4.1-sunxi. I do not have neither the 4.4.1 kernel, nor 4.4.1 sources installed.

root@ruir:/usr/src# ls -la
total 16
drwxr-xr-x  4 root root 4096 Apr  3 11:06 .
drwxr-xr-x 11 root root 4096 Oct 23 21:04 ..
drwxr-xr-x 25 root root 4096 Mar 30 21:29 linux-headers-4.4.1-sunxi
drwxr-xr-x  2 root root 4096 Apr  3 11:06 sysdig-0.5.1

So my question is, is there any file/configuration item in Linux I can change to make it compile to 4.4.1-sunxi and not 4.4.1?

1

I had to change in /lib/modules/4.4.1-sunxi/build the following occurrences of 4.4.1 to 4.4.1-sunxi

    include/generated/utsrelease.h:#define UTS_RELEASE "4.4.1"
    include/config/auto.conf.cmd:ifneq "$(KERNELVERSION)" "4.4.1"
    include/config/kernel.release:4.4.1

After this I was able to install sysdig/compile sysdig-probe.ko with the correct version.

So it appears that whilst some scripts do uname -r (or accept other kernel versions) and output they are doing the correct job for that, it appears that behind the scenes at least part of the module compilation consult the corresponding kernel version files for adjusting the version of the compiled module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.