Wednesday, May 2, 2007

modules adding in linux

Commands     Description
/sbin/lsmod        Lists all configured modules on your system      
/sbin/modprobe -l     Lists all available modules
/sbin/modprobe -c     Lists all configured aliases
/sbin/modprobe -r [module]           Removes a loaded module rmmod
/sbin/modprobe [module]     Loads a module same as insmod
man modprobe     Loads the documentation for modprobe

Note: For all new modules downloaded or compiled must be moved to /lib/modules/[kernel version]/ for the system to be able to use it.

After moving the modules to the appropriate directory, run depmod -a to let the system know about the new module, to test the module run this: modprobe [module name] if the module is loaded without error that means everything is OK. If you get any error messages, that means the module is wrong, or maybe the device is already running with the appropriate driver. Believe me it happens.

Modules loaded in the /etc/modules.conf, are loaded as alias of drivers. For example:

          Alias          Device          Driver           alias          eth0            8139too 

No comments: