# modprobe iwlwifi  Invalid module format[SOLVED]

## sumous

hello,every one!

It was my first time to install gentoo and I succeed!

However, when I compiled the drivers iwlwifi and modprobe iwlwifi, I got:

```
FATAL: Error inserting iwlwifi (/lib/modules/3.2.12-gentoo/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko): Invalid module format

```

and I find the dmesg log,got:

```
iwlwifi: version magic '3.2.12-gentoo SMP mod_unload modversions ' should be '3.2.12-gentoo SMP mod_unload '

```

Can somebody help me?Last edited by sumous on Sun Jul 15, 2012 4:32 am; edited 1 time in total

----------

## NeddySeagoon

sumous,

Welcome to Gentoo.

Whats happened is that you have changed an option in one part of the kernel that has affected how otherthings, that were not rebuild, should have been built.

This happends becasue make tries to be clever and reuse old binary file (without recompiling) if the binary file is newer than all of the source files needed to make the binary. It works most of the time and save a lot of time.

Remake and reinstall your kernel and its modules starting with the 

```
make clean
```

 step. Now there will be no old binaries for make to reuse.

Your .config will be unharmed.

----------

## sumous

Thanks a lot!

I just typed 

```
make clean
```

, and then 

```
modprobe iwlwifi
```

, it didn't work.

Then I type 

```
make && make modules_install
```

 to remake the kernel and modules, It also didn't work!

The problem was not solved, any other problem of my operation?

----------

## NeddySeagoon

sumous,

 *Quote:*   

> Then I type
> 
> ```
> 
> make && make modules_install
> ...

 

That is only a part of the solution. You have made your new kernel, its modules and installed the new modules but grub still uses your old kernel.

You must copy the new kernel binary to /boot, then reboot so the new kernel is actually used.

If you have a separate boot partition, don't forget to mount it before you copy the bzImage file across.

----------

## sumous

I'm sorry! I forget the step.

Thanks a lot, I got it, the problem is solved!

----------

