# Autoload Kernel modules

## Kunigunde

Hi,

last week i've done an update and everything crashed. I must chroot into the system and copy the stage3 into it. now it looks better.

But i have an problem. in the past, if i boot gentoo all kernel modules will be loaded automatically. if i add a new hardware, i've configure it in the kernel as a module. This modules are loaded automaticaly. now, lsmod is empty. i must load the modules. 

which service is broken for loading the auto modules loading?

OK i can add all moduels in modules, but this could not be the solution.

did anybody an idea?

/Kuni

----------

## ferreirafm

Hi Kunigunde,

You have to edit your /etc/modules.autoload.d/kernel-X.Y file with the modules you want to load. The X.Y is the kernel version which you are currently running. Additionally, you have to use the rc-update script to add the module service to the boot runlevel.

G'Luck

----------

## disi

Or put it into this file, which is kernel independent 

```
/etc/conf.d/modules
```

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7#doc_chap5

Oh and enable module loading in the kernel:

```
Loadable module support --->

  [*] Enable loadable module support
```

There is also something like autoloading in the category...

----------

## Kunigunde

Hi,

thanks for your answers, but this is clear for me. If i create a new installation(vmware) then the kernel modules (20 modules) will be automaticaly loaded.

there is nothing in the file modules or something else.

I think,  it could be something with /proc. 

/Kuni

----------

## disi

 *Kunigunde wrote:*   

> Hi,
> 
> thanks for your answers, but this is clear for me. If i create a new installation(vmware) then the kernel modules (20 modules) will be automaticaly loaded.
> 
> there is nothing in the file modules or something else.
> ...

 

Did you run a

```
# depmod -a
```

or rebuild the kernel and modules?

----------

## Kunigunde

Hi,

i have recreated my kernel and the modules

make && make mdoles_install

/Kuni

----------

