Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

While I can use lsmod in order to show currently active kernel modules, how can I see which drivers are statically built into the kernel AND currently active?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

If your linux has a /proc/config.gz

That has all the built modules. Copy it elsewhere and unzip it. Open the file everything with a "=M" is built as a module. Everything with a "=Y" is statically built.

hwinfo will list the "Driver:" check the above file to see if it is statically built.

FYI: All statically built drivers are always loaded into memory and ready for action. Without the corresponding hardware they will not do anything, but use memory.

share|improve this answer
    
What if there is no /proc/config.gz? –  Ian Apr 5 '13 at 13:25
    
Ok I just found a .config file in the directory where I compiled the kernel, that's obviously what you meant. –  Ian Apr 5 '13 at 13:51
    
This file also exists here: /boot/config-$(uname -r). –  Ian Apr 5 '13 at 13:58

You could do a cat /lib/modules/$(uname -r)/modules.builtin

From the Kernel Documentaton

modules.builtin

This file lists all modules that are built into the kernel. This is used by modprobe to not fail when trying to load something builtin.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.