# iwlwifi exec error and installing firmware without emerging

## ethan626

Hello!

I have installed gentoo on my other laptop and am having difficulty getting kernel to recognize my wifi card .

My problems are:

exec_format error when attempting to modprobe iwlwifi

Also I made a n00b mistake and did not install firmware for the card when I installed gentoo. I downloaded the firmware on another machine and transferred the firmware to the machine running gentoo. I am unable to deduce what steps to take to install the firmware so that my internet will work. I am unable to connect to the internet and thus cannot emerge the necessary firmware. 

lsmod is blank as there are no modules loaded.

Upon modprobe-ing maccfg80211 and iwlwifi I get the following dmesg 

dmesg shows

"cfg80211: version magic '4.1.15-gentoo-r1 SMP mod_unload modversions' should be '4.1.15-gentoo-r1 SMP mod_unload"

Thanks for your help.  :Very Happy: Last edited by ethan626 on Mon Apr 04, 2016 3:47 am; edited 1 time in total

----------

## charles17

Guess you've already worked through https://wiki.gentoo.org/wiki/Iwlwifi.  So will you please pastebin your output of lspci -nnkv and of dmesg | grep as from the wiki article.

----------

## chithanh

'exec format error' means that your kernel and your modules don't match. Built at different times and/or with different configuration.

To get the firmware, download http://distfiles.gentoo.org/distfiles/linux-firmware-20151207.tar.xz to a USB drive or boot from live media again, and place it in /usr/portage/distfiles

Then you can emerge linux-firmware.

----------

## ethan626

@chithanh Thanks I will try to emerge the firmware with the link. Glad to know that exists, sometimes its hard to sift through all the documentation, as good as it is.

@charles17 I have worked through the wiki. I will paste the info in a sec

----------

## ethan626

09:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] [8086:008a] (rev 34)

        Subsystem: Intel Corporation Centrino Wireless-N 1030 BGN [8086:5325]

        Flags: bus master, fast devsel, latency 0, IRQ 5

        Memory at f7a00000 (64-bit, non-prefetchable) [size=8K]

        Capabilities: [c8] Power Management version 3

        Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+

        Capabilities: [e0] Express Endpoint, MSI 00

        Capabilities: [100] Advanced Error Reporting

        Capabilities: [140] Device Serial Number 58-91-cf-ff-ff-04-45-84

        Kernel modules: iwlwifi

[    0.314245] pci 0000:09:00.0: [8086:008a] type 00 class 0x028000

[    0.314618] pci 0000:09:00.0: reg 0x10: [mem 0xf7a00000-0xf7a01fff 64bit]

[    0.316297] pci 0000:09:00.0: PME# supported from D0 D3hot D3cold

[    0.316491] pci 0000:09:00.0: System wakeup disabled by ACPI

[    0.336882] cfg80211: Calling CRDA to update world regulatory domain

[    0.629829] pci 0000:09:00.0: Signaling PME through PCIe PME interrupt

[    3.474057] cfg80211: Calling CRDA to update world regulatory domain

[    5.573574] cfg80211: version magic '4.1.15-gentoo-r1 SMP mod_unload modversions ' should be '4.1.15-gentoo-r1 SMP mod_unload '

[    6.614684] cfg80211: Calling CRDA to update world regulatory domain

[    9.753241] cfg80211: Calling CRDA to update world regulatory domain

[   12.891804] cfg80211: Calling CRDA to update world regulatory domain

[   16.030348] cfg80211: Calling CRDA to update world regulatory domain

[   19.168905] cfg80211: Calling CRDA to update world regulatory domain

[   22.307449] cfg80211: Calling CRDA to update world regulatory domain

[   25.446017] cfg80211: Calling CRDA to update world regulatory domain

[   28.584558] cfg80211: Calling CRDA to update world regulatory domain

[   31.723123] cfg80211: Calling CRDA to update world regulatory domain

[   34.861669] cfg80211: Exceeded CRDA call max attempts. Not calling CRDA

----------

## ethan626

@chithanh - I emerged the firmware thank you for your help I appreciate it! =)

Trying to recompile again now that the firmware is installed and seeing if that helps.

----------

## ethan626

Did make clean, make, make modules_install, make install and rebooted...got exec format error

----------

## ethan626

On another note, after reading some other solutions to see if there is a problem with my headers 

 /proc/config.gz the file does not exist

----------

## Buffoon

I'm going to tell you a secret, keep it between us, alright? Them, they do it on purpose, to tease newcomers. First they instruct you to create a separate boot partition, then they tell you not to automount it in fstab, and then they laugh on us when we forget to mount boot before installing a new kernel! Yup, with boot not mounted you can install kernels as many as you want, when you reboot it will still be the old kernel you installed with Gentoo.

----------

## chithanh

You can check with 

```
$ uname -a
```

(build date and time) to see whether you are running the kernel you think you are.

You can prevent accidental writes to /boot by running "chattr +i /boot" while /boot is empty and unmounted. Or put "ro" instead of "noauto" in fstab, then

```
# mount -o remount,rw /boot
```

every time you want to make changes in /boot

----------

## ethan626

edited fstab per recommendations.

It is running the old kernel from when I installed gentoo.

My new Kernel is not showing up on eselect kernel list. Suggestions?

Thx for the help

----------

## Buffoon

eselect kernel makes a symlink to kernel sources, nothing else.

----------

## ethan626

Do I need to download the source again or recompile and use an option other than:

make  make modules_install, make install, running this from the old source

Sorry about the n00b. Questions.

----------

## chithanh

"make install modules_install" and then point your boot loader to the new kernel.

("new kernel" as in newly built, not new kernel version)

----------

## charles17

 *ethan626 wrote:*   

> Do I need to download the source again or recompile and use an option other than:
> 
> make  make modules_install, make install, running this from the old source

 

There are some common pitfalls already mentioned by Buffoon.  Did you come across this wiki article when working through iwlwifi?  These articles have been created expecting to be fully sufficient to follow them.

What is missing?

----------

