# Build problem with custom kernel module

**URL:** <https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051>\
**Category:** Rocky Linux Help & Support\
**Created:** [December 14, 2025, 5:14am UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051 "2025-12-14T05:14:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveAtFraud](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/daveatfraud/32/2824_2.png) [@DaveAtFraud](https://forums.rockylinux.org/u/DaveAtFraud)\
**Post date:** [December 14, 2025, 5:14am UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/1 "2025-12-14T05:14:11Z")

</div>

Just ran into a build problem with a custom kernel module I use. On attempting to rebuild the module for kernel 5.14.0-611.13.1.el9\_7.x86\_64, I got:

`[dave@burn kernel]$ make clean`

`rm -f mhvtl.ko`  
`rm -f *.o`  
`rm -f TAGS`  
`rm -f config.h`  
`[dave@burn kernel]$ make`  
`./config.sh`  
`make -C /lib/modules/5.14.0-611.13.1.el9_7.x86_64/build M=/home/dave/noBackup/build/mhvtl-master/kernel modules`  
`make[1]: Entering directory ‘/usr/src/kernels/5.14.0-611.13.1.el9_7.x86_64’`  
`CC [M] /home/dave/noBackup/build/mhvtl-master/kernel/mhvtl.o`  
`MODPOST /home/dave/noBackup/build/mhvtl-master/kernel/Module.symvers`  
`CC [M] /home/dave/noBackup/build/mhvtl-master/kernel/mhvtl.mod.o`  
`LD [M] /home/dave/noBackup/build/mhvtl-master/kernel/mhvtl.ko`  
`BTF [M] /home/dave/noBackup/build/mhvtl-master/kernel/mhvtl.ko`  
**`Skipping BTF generation for /home/dave/noBackup/build/mhvtl-master/kernel/mhvtl.ko due to unavailability of `_`vmlinux`_**  
`make[1]: Leaving directory ‘/usr/src/kernels/5.14.0-611.13.1.el9_7.x86_64’`

The workaround was to just manually complete the module installation:

[root@burn kernel]# install -o root -g root -m 644 mhvtl.ko /lib/modules/5.14.0-611.13.1.el9\_7.x86\_64/kernel/drivers/scsi/; depmod -a  
[root@burn kernel]# modprobe mhvtl  
[root@burn kernel]# lsmod | grep mhvtl  
mhvtl 61440 0  
[root@burn kernel]# systemctl start mhvtl.target  
[root@burn kernel]# systemctl status mhvtl.target  
● mhvtl.target - mhvtl service allowing to start/stop all vtltape@.service and vtllibrary@.service instances at once  
Loaded: loaded (/usr/lib/systemd/system/mhvtl.target; enabled; preset: disabled)  
Active: active since Sat 2025-12-13 21:04:42 MST; 38min ago  
Until: Sat 2025-12-13 21:04:42 MST; 38min ago  
Docs: man:man:vtltape(1)  
man:man:vtllibrary(1)

Dec 13 21:04:42 [burn.local.davenjudy.org](http://burn.local.davenjudy.org) systemd[1]: Reached target mhvtl service allowing to start/stop all vtltape@.s\>

Was this a build/packaging problem at Rocky or RHEL?

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [December 14, 2025, 9:04am UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/2 "2025-12-14T09:04:45Z")

</div>

I’m failing to see what the problem is in your output. Can you make it more clearer what exactly the problem is?

Your first output you seem to suggest the solution to that was to manually install the module, and then you modprobe it and all looks fine. Then you list the systemctl output but I don’t see any problem there either.

Would be better for you to make it much clearer with a bit more detail into what exactly the problem is. Because I don’t see anything in what you posted so far.

---

<div class="post-metadata">

**Author:** ![DaveAtFraud](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/daveatfraud/32/2824_2.png) [@DaveAtFraud](https://forums.rockylinux.org/u/DaveAtFraud)\
**Post date:** [December 14, 2025, 4:31pm UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/3 "2025-12-14T16:31:04Z")

</div>

The make is supposed to include performing the install. make detects the warning and bails out. BTF generation is adding some sort of debugging information which could be important to developers. The workaround worked for me but what I could find regarding the issue indicated that that might not always be the case. I’d rather flag something like this than ignore it because the workaround worked for me.

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [December 14, 2025, 4:45pm UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/4 "2025-12-14T16:45:48Z")

</div>

Hmm, usually when I’ve used make commands, you need to use `make install` after the `make` command. Maybe it’s different for kernel modules, I dunno.

But yeah you are right to flag it if the BTF message didn’t appear before. Although all it’s doing is skipping that part due to not finding vmlinuz for some reason.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [December 14, 2025, 6:48pm UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/5 "2025-12-14T18:48:33Z")

</div>

In addition, the ‘make’ command in the original post is being run as standard user, so not sure how it could install a kernel module?

---

<div class="post-metadata">

**Author:** ![DaveAtFraud](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/daveatfraud/32/2824_2.png) [@DaveAtFraud](https://forums.rockylinux.org/u/DaveAtFraud)\
**Post date:** [December 15, 2025, 1:57am UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/6 "2025-12-15T01:57:15Z")

</div>

Normally I would do a “sudo make install” as the next step after the make. Previous experience (other projects) has been that this won’t work unless the make completed successfully. That seems not to be the case with this particular problem. I tried doing a sudo make install after this failed make and it worked.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [December 15, 2025, 10:08pm UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/7 "2025-12-15T22:08:50Z")

</div>

But earlier on, you said

> [@DaveAtFraud](#):
>
> The make is supposed to include performing the install.

Now you say you have to run ‘make install’ as root, so which is it?

---

<div class="post-metadata">

**Author:** ![DaveAtFraud](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/daveatfraud/32/2824_2.png) [@DaveAtFraud](https://forums.rockylinux.org/u/DaveAtFraud)\
**Post date:** [December 15, 2025, 10:23pm UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/8 "2025-12-15T22:23:38Z")

</div>

Forgot. Happens when I try to remember infrequently performed tasks. Is thiis punishable by death or just life imprisonment?

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [December 16, 2025, 8:44am UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/9 "2025-12-16T08:44:57Z")

</div>

Nah, just prob time for a beer and relax 🙂

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [December 16, 2025, 6:33pm UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/10 "2025-12-16T18:33:50Z")

</div>

Nothing wrong with forgetting, it was just hard to make sense of the steps being shown.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [December 16, 2025, 9:18pm UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/11 "2025-12-16T21:18:09Z")

</div>

> [@gerry666uk](#):
>
> Now you say you have to run ‘make install’ as root, so which is it?

Traditionally the ‘install’ rule in makefile copies the “products” of build to somewhere where they are used. For normal applications that somewhere – the “prefix” – tends to be `/user/local`, so the install copies executables to `/user/local/bin/` and so forth. Since only root can write to `/user/local` (by default), only root can copy there. The `/lib/modules` is likewise read-only for non-roots. (One can usually redefine the prefix with `./configure`)

Preferably none of the build is done as root (but then one has to install by other means), and running `make install` as root is a compromise. Anyway, the default target (invoked by plain `make`) does not include the ‘install’ target (for normal applications – don’t know about kernel modules – the rules are in the `Makefile`). (It could, but I cannot recall any example.)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [February 14, 2026, 9:18pm UTC](https://forums.rockylinux.org/t/build-problem-with-custom-kernel-module/20051/12 "2026-02-14T21:18:25Z")

</div>

Closed on February 14, 2026, 9:18pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
