_jgmm
December 8, 2017, 6:43pm
#1
hi.
i’ve googled, i’ve searched in this forum, i’ve searched in the wiki, i surfed trough yast… no success.
can anyone link to a guide of how to add kernel modules?
i want to add usbmon to my machine.
jg@Osuse ** ~****$**cat /etc/os-release
NAME=“openSUSE Leap”
VERSION=“42.2”
ID=opensuse
ID_LIKE=“suse”
VERSION_ID=“42.2”
PRETTY_NAME=“openSUSE Leap 42.2”
ANSI_COLOR=“0;32”
CPE_NAME=“cpe:/o:opensuse:leap:42.2”
BUG_REPORT_URL=“https://bugs.opensuse.org ”
HOME_URL=“https://www.opensuse.org/ ”
i downloaded kernel-devel but did not see any change in yast.
_jgmm:
hi.
i’ve googled, i’ve searched in this forum, i’ve searched in the wiki, i surfed trough yast… no success.
can anyone link to a guide of how to add kernel modules?
i want to add usbmon to my machine.
jg@Osuse ** ~****$**cat /etc/os-release
NAME=“openSUSE Leap”
VERSION=“42.2”
ID=opensuse
ID_LIKE=“suse”
VERSION_ID=“42.2”
PRETTY_NAME=“openSUSE Leap 42.2”
ANSI_COLOR=“0;32”
CPE_NAME=“cpe:/o:opensuse:leap:42.2”
BUG_REPORT_URL=“https://bugs.opensuse.org ”
HOME_URL=“https://www.opensuse.org/ ”
i downloaded kernel-devel but did not see any change in yast.
Hi and welcome to the Forum
No need to add the module, it’s already there;
/sbin/modinfo usbmon
filename: /lib/modules/4.4.92-18.36-default/kernel/drivers/usb/mon/usbmon.ko
license: GPL
srcversion: 8F138B1C267451C937A2596
depends: usbcore
intree: Y
vermagic: 4.4.92-18.36-default SMP mod_unload modversions
signer: openSUSE Secure Boot Signkey
sig_key: 03:32:FA:9C:BF:0D:88:BF:21:92:4B:0D:E8:2A:09:A5:4D:5D:EF:C8
sig_hashalgo: sha256
If (as root user) run the command;
modprobe usbmon
lsmod |grep usb
Should be in the list, if you want to make this persistent over reboots, add to a file in /etc/modules-load.d/ called usbmon.conf and in this file one line with the module name usbmon.
_jgmm
December 13, 2017, 12:25am
#3
thanks. a lot.
anyway, out of curiosity… what is the procedure for adding a module to the kernel? coud you please lead me to some link about the issue?
Hi
So that sorted it out?
If the hardware is present it should all be added automatically when needed, if wanting to be loaded then the directory /etc/modules-load.d.
Or do you mean an out of kernel tree module, if so openSUSE uses a kmp rpm (SLE centric but applicable also for openSUSE);
https://www.suse.com/communities/blog/using-opensuse-build-service-create-and-distribute-kernel-module-packages/
https://www.suse.com/communities/blog/using-sles-and-the-sle-sdk-build-kernel-module-package-kmp/
tsu2
December 13, 2017, 2:05am
#5
You can load a Loadable Kernel Module using the modprobe command as Malcolm described in his first post.
These are only LKM.
There are other kernel modules which are not “loadable” so would be added to the base kernel image instead.
TSU