Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Get exact running kernel's source

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
oT2
Posts: 1
Joined: 2021-12-03 15:06

Get exact running kernel's source

#1 Post by oT2 »

Hi,

I am trying to compile DRBD with my kernel source. I ran `apt-get source linux`, `apt-get install linux-source` I tried them with `-$(uname -r)` at the end but none of them give me the exact source.

cat /proc/version and uname -r give me the following version: Linux version 4.19.0-18-amd64

all my source download attempts gave me version 4.19.208 or 4.19.194. Once I build DRBD with those and run make install, drbd.ko ends up in /lib/modules/4.19.208/... and not /lib/modules/4.19.0-18-amd64/...

I tried to copy the build to /lib/modules/4.19.0-18-amd64, but then modprobe drbd throws an error
root@linux-vm:~# modprobe drbd
modprobe: ERROR: could not insert 'drbd': Exec format error

Is there no way to get exact sources for a specific debian release ?

Thank you,
Gab

User avatar
jby
Posts: 13
Joined: 2022-01-18 13:39
Contact:

Re: Get exact running kernel's source

#2 Post by jby »

Update your running kernel to one of the ones you find sources for, then it ought to be easy to install the sources and build DRBD for that kernel.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Get exact running kernel's source

#3 Post by p.H »

If you want to build a foreign module for your running kernel you need to install the matching linux-headers-$(uname -r), not linux-source.

Post Reply