Results 1 to 6 of 6

Thread: how to add kernel module?

  1. #1
    Join Date
    Dec 2017
    Location
    México
    Posts
    5

    Question how to add kernel module?

    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:/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.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,316
    Blog Entries
    15

    Default Re: how to add kernel module?

    Quote Originally Posted by _jgmm_ View Post
    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:/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;
    Code:
    /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;
    Code:
    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.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Dec 2017
    Location
    México
    Posts
    5

    Default Re: how to add kernel module?

    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?

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,316
    Blog Entries
    15

    Default Re: how to add kernel module?

    Quote Originally Posted by _jgmm_ View Post
    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/blo...dule-packages/
    https://www.suse.com/communities/blo...e-package-kmp/
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: how to add kernel module?

    Quote Originally Posted by _jgmm_ View Post
    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?
    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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6
    Join Date
    Dec 2017
    Location
    México
    Posts
    5

    Default Re: how to add kernel module?

    ok. thanks everyone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •