Easy method to test kernel modules (drivers)
This document (7015696) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 11 Service Pack 2 (SLES 11 SP2)
SUSE Linux Enterprise Server 11 Service Pack 1 (SLES 11 SP1)
Situation
Resolution
- Create the /lib/modules/{kernelversion}/updates directory. Where {kernelversion} is output of "uname -r". Drivers in the "updates" directory have precedence.
- Copy {driver}.ko to /lib/modules/{kernelversion}/updates/ Where {driver} is the name of the driver.
- Run “depmod -a” to resolve dependencies.
- Run "modprobe {driver}" to load the driver.
- Run "lsmod | grep {driver}" This checks to make sure the driver got loaded
- Run "modinfo {driver}" Use this command to confirm that the driver loaded from your /lib/modules/{kernelversion}/update directory
Example using e1000e Intel Network driver:
localhost:/lib/modules # mkdir /lib/modules/`uname -r`/updateslocalhost:/lib/modules # cp -v /tmp/e1000e.ko /lib/modules/`uname -r`/updates
`/tmp/e1000e.ko' -> `/lib/modules/3.0.101-0.35.1.7228.2.PTF-default/updates/e1000e.ko'
localhost:/lib/modules # depmod -a
localhost:/lib/modules # modprobe e1000e
localhost:/lib/modules # lsmod | grep e1000e
e1000e 258556 0
localhost:/lib/modules # modinfo e1000e | head -5
filename: /lib/modules/3.0.101-0.35.1.7228.2.PTF-default/updates/e1000e.ko
version: 2.1.4-k
license: GPL
description: Intel(R) PRO/1000 Network Driver
author: Intel Corporation, <linux.nics@intel.com>
Additional Information
- Run "rmmod {driver}" to unload the driver.
- Delete the driver from /lib/modules/{kernelversion}/updates.
- Run "depmod -a" to reset the path to the in-kernel driver.
- Run "modprobe {driver}" to reload the in-kernel driver.
Production systems should use an updated kernel that includes the needed drivers or a Kernel Module Package (KMP) that has the needed drivers.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7015696
- Creation Date: 25-Sep-2014
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com