[luau] Questions about installing modules

MonMotha monmotha at indy.rr.com
Fri Feb 14 10:27:00 PST 2003


demon_jr808 wrote:
> Hi Everyone,
>  
> There are some issues that are not entirely clear to me when I run "insmod".
>  
> Here is an example:
>  
> After entering the following command: # insmod tlan.o
> I recieve the following message: TLAN driver, v1.0, (C) 1997-8 Caldera, Inc
>  
> Should there be more to the message than this? Various examples I have 
> seen displayed other messages such as the driver being loaded, 
> installed, etc. Is this a sign that although this module is loaded, 
> there is no actually hardware device attached to this particular module? 
> When attempting to load another module, I receive either "unresolved 
> symbol" or "device or resource busy". If anyone can clue me in to what 
> this means (in layman's terms), it would be greatly appreciated.

Check "dmesg" (the command) to look at the rest of the kernel messages.  It 
might have been logged at a lower priority than is displayed to your terminal.

Regarding unresolved symbols, use modprobe instead of insmod.  Some (many) 
modules depend on other modules being loaded first, and modprobe will take care 
of this dependency tree for you.

Device or resource busy when loading a module generally means one of two things:
a) The resource the driver is trying to claim is already claimed by another 
driver (like trying to load usb-uhci and uhci at the same time, two drivers for 
the same USB host device cannot coexist).

b) The resource the driver is trying to claim is nonexistant.  Usually this 
means that the device the driver is made to support is not present in your computer.

Generally, outputting nothing signifies success (though with module loading, 
your kernel logs should show the driver identifying and claiming a device).

>  
> Next, I entered the following command to see if the module was loaded: # 
> lsmod
> In regards to the module in question I received the following message: 
> Module - tlan    Pages - 5       Used By - 0
>  
> Based on the above message, I am assuming that the module was 
> successfully installed. However, based on the "Used By - 0" line, I am 
> assuming that the module is not being used by any particular hardware 
> device. Can someone verify if my assumption is correct?

Used by means the number of other modules using it or the number of userspace 
apps that have it's resource open.  I assume the tlan driver is an ethernet 
driver; this would mean (since it has a usage count of zero) that the device is 
currently in the link down state.  To bring it up, use ifconfig or the ip 
command.  When the usage count is nonzero, the module cannot be unloaded.  When 
the usage count is zero, the module can be unloaded using the rmmod command. 
Some modules will set their usage count to -1 permenantly to signify that once 
loaded, they cannot be unloaded without rebooting (like the ipv6 module, the 
linux IPv6 support).

>  
> That being the case, when attempting to install a module for a hardware 
> device, does the module automatically "attach" itself to the hardware 
> device it is designed for? For instance, if I install a sound card that 
> is not recognized by Linux, then install the appropriate modules, will 
> the sound card then become "active" once the correct modules are 
> installed or is there more to the process than "just" installing the 
> modules?

Usually yes.  If the driver isn't compiled into your kernel (and is instead a 
module), it will not be recognized at startup as a supported device (however, if 
it's PCI or ISA PnP, the kernel will still know about it and will tell drivers 
loaded in the future about it).  When you load a module, it will "claim" the 
device and present the appropriate interface to userspace, usually via /dev.  If 
you use devfs, you can see this take place in real time as device nodes 
(psudeofiles that represent your devices) are created and removed in /dev 
according to the hardware present and recognized as having a supporting driver 
by the kernel (this also applies to hot swappable hardware such as USB devices, 
IEEE1394 [firewire] devices, hot swappable hard drives, etc).

>  
> Any help would be appreciated.
>  
> Thanks!

Hope this helps.

--MonMotha

P.S. When posting to a mailing list, it's customary to post in plain text ONLY 
as a courtesy to those who don't like HTML mail, have MUAs which can't handle 
HTML mail, and to keep the size of the mailing list archive down.




More information about the LUAU mailing list