Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

66%
+2 −0
Q&A Install locally-compiled kernel module

I never bothered signing kernel modules, so I can't say anything about that part except that I never had problems with unsigned modules. TBH the thought to do so never even occurred to me. But yes...

posted 1y ago by GeraldS‭  ·  edited 1y ago by GeraldS‭

Answer
#2: Post edited by user avatar GeraldS‭ · 2025-08-15T04:45:54Z (about 1 year ago)
  • I never bothered signing kernel modules, so I can't say anything about that part except that I never had problems with unsigned modules. TBH the thought to do so never even occurred to me.
  • But yes, you will need to recompile the module every time a new kernel module is installed, which is quite often, since this also includes updates of the kernel package by the distribution maintainer. DKMS (_Dynamic Kernel Module Support_) is the way to go here, since it will do that automatically whenever the kernel is updated.
  • To do so you will need to create a file called `dkms.conf` inside the directory you extracted from the module source code tarball:
  • ```bash
  • cd awesome-20091211-v1.1/
  • texteditorofyourchoice dkms.conf
  • ```
  • The config file should look something like this:
  • ```conf
  • MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
  • CLEAN="make -C src/ clean"
  • BUILT_MODULE_NAME=awesome
  • BUILT_MODULE_LOCATION=src/
  • PACKAGE_NAME=awesome
  • PACKAGE_VERSION=1.1
  • REMAKE_INITRD=yes
  • ```
  • You will need to check the README file of the module for the correct commands to build the module and replace `awesome` with the module name, and of course set the proper version number.
  • Then you will need to copy into the kernel source tree at `/usr/src/<modulename>-<version>`. Again, replace the placeholders with the module name and the version number.
  • ```
  • ls
  • README dkms.conf lib src
  • sudo cp -R . /usr/src/awesome-1.1
  • sudo dkms add -m awesome -v 1.1
  • dkms does its thing...
  • ```
  • Now we can test if building the module works.
  • ```
  • sudo dkms build -m awesome -v 1.1
  • dkms does its thing.... watch for build errors... you may need to tweak dkms.conf
  • ```
  • If everything works, install the module.
  • ```
  • sudo dkms install -m awesome -v 1.1
  • dkms does its thing.... module is copied into current kernel module tree
  • ```
  • Instructions taken from: https://help.ubuntu.com/community/DKMS
  • I never bothered signing kernel modules, so I can't say anything about that part except that I never had problems with unsigned modules. TBH the thought to do so never even occurred to me.
  • But yes, you will need to recompile the module every time a new kernel module is installed, which is quite often, since this also includes updates of the kernel package by the distribution maintainer. DKMS (_Dynamic Kernel Module Support_) is the way to go here, since it will do that automatically whenever the kernel is updated.
  • To do so you will need to create a file called `dkms.conf` inside the directory you extracted from the module source code tarball:
  • ```bash
  • cd awesome-20091211-v1.1/
  • texteditorofyourchoice dkms.conf
  • ```
  • The config file should look something like this:
  • ```conf
  • MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
  • CLEAN="make -C src/ clean"
  • BUILT_MODULE_NAME=awesome
  • BUILT_MODULE_LOCATION=src/
  • PACKAGE_NAME=awesome
  • PACKAGE_VERSION=1.1
  • REMAKE_INITRD=yes
  • ```
  • You will need to check the README file of the module for the correct commands to build the module and replace `awesome` with the module name, and of course set the proper version number.
  • Then you will need to copy into the kernel source tree at `/usr/src/<modulename>-<version>`. Again, replace the placeholders with the module name and the version number.
  • ```
  • ls
  • README dkms.conf lib src
  • sudo cp -R . /usr/src/awesome-1.1
  • sudo dkms add -m awesome -v 1.1
  • dkms does its thing...
  • ```
  • Now we can test if building the module works.
  • ```
  • sudo dkms build -m awesome -v 1.1
  • dkms does its thing.... watch for build errors... you may need to tweak dkms.conf
  • ```
  • If everything works, install the module.
  • ```
  • sudo dkms install -m awesome -v 1.1
  • dkms does its thing.... module is copied into current kernel module tree
  • ```
  • Now every time the kernel is updated by the package manager the module will be recompiled with the corresponding header files and installed automatically.
  • Instructions taken from: https://help.ubuntu.com/community/DKMS
#1: Initial revision by user avatar GeraldS‭ · 2025-08-15T04:43:27Z (about 1 year ago)
I never bothered signing kernel modules, so I can't say anything about that part except that I never had problems with unsigned modules. TBH the thought to do so never even occurred to me.

But yes, you will need to recompile the module every time a new kernel module is installed, which is quite often, since this also includes updates of the kernel package by the distribution maintainer. DKMS (_Dynamic Kernel Module Support_) is the way to go here, since it will do that automatically whenever the kernel is updated.

To do so you will need to create a file called `dkms.conf` inside the directory you extracted from the module source code tarball:

```bash
cd awesome-20091211-v1.1/
texteditorofyourchoice dkms.conf
```

The config file should look something like this:

```conf
MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="make -C src/ clean"
BUILT_MODULE_NAME=awesome
BUILT_MODULE_LOCATION=src/
PACKAGE_NAME=awesome
PACKAGE_VERSION=1.1
REMAKE_INITRD=yes
```

You will need to check the README file of the module for the correct commands to build the module and replace `awesome` with the module name, and of course set the proper version number.

Then you will need to copy into the kernel source tree at `/usr/src/<modulename>-<version>`. Again, replace the placeholders with the module name and the version number.

```
ls
    README dkms.conf lib src
sudo cp -R . /usr/src/awesome-1.1
sudo dkms add -m awesome -v 1.1
    dkms does its thing...
```

Now we can test if building the module works.

```
sudo dkms build -m awesome -v 1.1
    dkms does its thing.... watch for build errors... you may need to tweak dkms.conf
```

If everything works, install the module.

```
sudo dkms install -m awesome -v 1.1
    dkms does its thing.... module is copied into current kernel module tree
```

Instructions taken from: https://help.ubuntu.com/community/DKMS