# /etc/conf.d/modules, modules.d or modules.autoload.d?

## henri

Hi folks,

I'm currently upgrading some gentoo boxes and some give me messages that confuse me.

They all should use baselayout-2 now.

Where to list the kernel-modules now which should be loaded automaticcally at startup?

The latest portage tree provides a /etc/modules.autoload.d directory but also the /etc/conf.d/modules configuration file.

The documentation of update-modules says modules should be listed in /etc/modules.d.

So where is the correct place now to list the kernel-modules?

Many thanks in advance,

    yours Henri

----------

## henri

Aaah, sorry, did it some times before but simly forgot it and took a look at the openrc migration guide again.

It's clear now, with baselayout-2 /etc/modules.autoload.d is not used anymore and values go into /etc/conf.d/modules.

Btw., here's a small one-liner of me to automaticcally add all loaded modules listed with lsmod to /etc/conf.d/modules for the ones who need to migrate:

```
for i in `lsmod | cut -d ' ' -f 1 | grep -v 'Module'`; do echo "modules_2_6=\"\${modules_2_6} $i\"" >> /etc/conf.d/modules; done;
```

But what goes into /etc/modules.d ?

Yours Henri

----------

## krinn

 *henri wrote:*   

> 
> 
> But what goes into /etc/modules.d ?
> 
> 

 

nothing, it's just unused.

my trees are like that :

- /etc/modprobe.d/*.conf: configurations files for modules, this is == old /etc/module.d. It's too old for me to remember, but /etc/module.d was change to /etc/modprobe.d times ago for a reason i've forget. And update-modules handle that despite its manual.

- /etc/modprobe.conf : new version of /etc/modules.conf, again, replace it times ago, lol for the same reason (can't remember)

- /etc/conf.d/modules: new autoload but this time can target a kernel version specificaly instead of 2.4 or 2.6 like before.

So if you follow what i have said, you should know that :

/etc/modules.conf can be remove

/etc/module.d can be remove

/etc/modprobe.d should exist

/etc/conf.d/modules handle by openrc

/etc/modprobe.conf is now handle & create by update-modules

I hope i make it clearer

----------

## JohnBlbec

 *krinn wrote:*   

>  *henri wrote:*   
> 
> But what goes into /etc/modules.d ?
> 
>  
> ...

 

jsut one fix: /etc/module.d should be /etc/modules.d

----------

