2

How can I find out with which settings my kernel was compiled?

I would like to understand the concept behind this. I wonder how I can find out which device uses which module.

For example: right now, I want to find out which which wifi module my kernel is running because it is my Intel Corporation Wireless-N 7260 card dies randomly

I tried: make menuconfig but this just shows:

make: *** No rule to make target `menuconfig'.  Stop.

Or can I find out the module with sysctl? This is the output of sysctl -a

rubo77
  • 32,486
  • Notice that the kernel was probably compiled with gazillion wifi modules. You should check which wifi module is loaded, with lsmod. – Rmano Sep 08 '14 at 09:45

2 Answers2

1

You can quickly list all flags that were used during kernel compilation using:

cat /boot/config-`uname -r`

On a 14.04 system, the Intel 7260 firmware is provided by the linux-firmware package, you can check its filelist.

0

It doesn't really help to understand the concept to look at the kernel settings:

cat /boot/config-`uname -r`

This only shows which settings were used, while the kernel was compiled and unless you want to compile your own kernel, there is now use to change this.

You want to look at the output of lsmod, which shows all loaded modules. There you can guess, which module could be used for which device, In this example it is something with "iw:

$ lsmod|grep iw
iwlmvm                184162  0 
mac80211              582807  1 iwlmvm
iwlwifi               161370  1 iwlmvm
cfg80211              447796  3 iwlwifi,mac80211,iwlmvm

for each module you can see details with modinfo <modulename>

You find your device name and ID with lspci (or lsusb) for example:

$ lspci|grep -i wireless
01:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b)

then search for the device-id string 7260 in the details of the loaded modules, in this case you succeed with:

$ modinfo iwlwifi|grep 7260
firmware:       iwlwifi-7260-7.ucode

then locate the firmware-file with

$ locate  iwlwifi-7260-7.ucode
/lib/firmware/iwlwifi-7260-7.ucode
rubo77
  • 32,486
  • If you only look for the driver of your wireless-card, you can also use nm-tool |grep Driver to get the module – rubo77 Sep 17 '14 at 06:20