# Updated the kernel, no /modules.autoload.d folder [solved]

## h2sammo

i am trying to edit modules to load at startup but there is no autoload file

```
# nano -w /etc/modules.autoload.d/kernel-2.6
```

i type that and it opens an empty fileLast edited by h2sammo on Tue Apr 07, 2009 4:28 pm; edited 4 times in total

----------

## DONAHUE

Empty or like this??

 *Quote:*   

> # /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.
> 
> #
> 
> # Note that this file is for 2.6 kernels.
> ...

 

For the most part you do not need to put anything here, unless you changed the default in the kernel:

 *Quote:*   

> [*] Enable loadable module support  ---> 
> 
>  --- Enable loadable module support
> 
>  [ ]   Forced module loading
> ...

 

the kernel will handle module loading with a follow up by udev.

If you look in the handbook:

 *Quote:*   

> Configuring the Modules
> 
> You should list the modules you want automatically loaded in /etc/modules.autoload.d/kernel-2.6. You can add extra options to the modules too if you want.
> 
> To view all available modules, run the following find command. Don't forget to substitute "<kernel version>" with the version of the kernel you just compiled:
> ...

 

This is saying that you look where compiled modules are installed, they have names ending in .o or .ko, you get a list, and then you put the name(s) of those modules you need (less the .o or .ko) into /etc/modules.autoload.d/kernel-2.6. 

Again you only need to do this if a module you need does not autoload when the kernel boots. If you do have a stray needed module you should modprobe or insmod it instead of putting it in autoload.d (imho). If that does not start it autoloading then to autoload.d.

----------

## h2sammo

no, not like that.

when nano is directed to that file it creates a new  one (completely empty)

----------

## DONAHUE

interesting. Apparently the stage 3 tarball no longer provides the commentary file. Hopefully the rest of my blather was useful.

----------

## h2sammo

well the file was there before i made some changes in menuconfig.  it is still tring to load modules i had set in that file before upon startup.  it fails ofcourse.  syste, still boots, but i want to change startup modules and now i cant find that file...

----------

## DONAHUE

if there is no autoload.d then it is not causing module loading, the kernel and udev are.

----------

## h2sammo

the reason why i ask this is because i want to load fglrx before i start xorg...was thinking i put it in autoload.  is there any other way to do it?

btw i need help with locking X on startx here: https://forums.gentoo.org/viewtopic-t-748592-highlight-.html

----------

## DONAHUE

first I believe your kernel should look lie this: *Quote:*   

> 
> 
> Bus options (PCI etc.)  --->
> 
>   [*] PCI Express support
> ...

 

If your kernel looks like this, you should be able to boot and startx (no /etc/X11/xorg.conf) (while still lacking 3d acceleration).

I use and would recommend open source  *Quote:*   

> emerge xf86-video-ati

  and use that to 3d accelerate. Driver named radeon.

Also open source 

```
emerge ati-drivers
```

. Comes with an aticonfig utility. I've had no luck with this. Driver named ati.

Also open source 

```
emerge xf86-video-radeonhd
```

 masked, I have not tried. Driver named radeonhd.

If you really want fglrx, you should be able to find the appropriate driver for your card on the ati website, download it, exit the gui, cd to the directory containing the download, make, make install, modprobe fglrx, eselect opengl fglrx, startx . Driver named fglrx.Last edited by DONAHUE on Mon Mar 23, 2009 2:01 am; edited 1 time in total

----------

## pacmac

and how can you force udev to no load a module at init?

----------

## DONAHUE

vague recollection of a black list

or simply

rebuild the kernel without the module using the usual make && make modules_install

----------

## gimpel

You maybe have baselayout2 (~arch), so take a look at /etc/conf.d/modules.

For blacklisting see /etc/modprobe.d/blacklist

----------

## h2sammo

/etc/conf.d/modules

```
# You can define a list modules for a specific kernel version,

# a released kernel version, a main kernel version or just a list.

#modules_2_6_23_gentoo_r5="ieee1394 ohci1394"

#modules_2_6_23="tun ieee1394"

#modules_2_6="tun"

#modules="ohci1394"

# You can give modules a different name when they load - the new name

# will also be used to pick arguments below.

#modules="dummy:dummy1"

# Give the modules some arguments if needed, per version if necessary.

#module_ieee1394_args="debug"

#module_ieee1394_args_2_6_23_gentoo_r5="ieee1394 ohci1394"

#module_ieee1394_args_2_6_23="tun ieee1394"

#module_ieee1394_args_2_6="tun"

# You should consult your kernel documentation and configuration

# for a list of modules and their options.
```

im not sure what to do with this info

/etc/modprobe.d/blacklist  seems like nothing is blacklisted

```
# This file lists modules which will not be loaded by udev,

# not at coldplugging and not on hotplug events.

# Add your own entries to this file

# in the format "blacklist <name of module>"

# Some examples:

# evbug is a debug tool and should be loaded explicitly

blacklist evbug

# Autoloading eth1394 most of the time re-orders your network

# interfaces, and with buggy kernel 2.6.21, udev persistent-net

# is not able to rename these devices, so you get eth?_rename devices

# plus an exceeded 30sec boot timeout

blacklist eth1394

# You probably want this to not get the console beep loud on every tab :)

#blacklist pcspkr

# these drivers are very simple, the HID drivers are usually preferred

#blacklist usbmouse

#blacklist usbkbd

# Sometimes loading a framebuffer driver at boot gets the console black

#install pci:v*d*sv*sd*bc03sc*i* /bin/true
```

just to make sure we are not sidetracked, my original post was about me not having  an /etc/modules.autoload.d folder.  anyway i can get that folder so i can implement some startup modules?  I figured out the fglrs but now i need to load snd-hda-intel at startup as i have no sound right now and i have it selected as module in kernel config.

----------

## pappy_mcfae

 *h2sammo wrote:*   

> just to make sure we are not sidetracked, my original post was about me not having  an /etc/modules.autoload.d folder.  anyway i can get that folder so i can implement some startup modules?  I figured out the fglrs but now i need to load snd-hda-intel at startup as i have no sound right now and i have it selected as module in kernel config.

 

As long as you have your kernel .config set properly, you don't need /etc/modules.autoload.d or /etc/conf.d/modules. Since the .28 kernels, the modules load automatically unless blacklisted. Before then, you could select whether or not the kernel autoloaded modules. IMO, it's more efficient to do load modules this way.

The fact that you are missing /etc/modules.autoload.d/ means that somehow, you have updated to baselayout-2/openrc. You can be sure of that by looking through the results of emerge --info. This shouldn't happen unless you've recently changed to ~arch, or purposely unmasked baselayout-2/openrc. The only versions of baselayout that are marked stable are 1.11.15-r3 and 1.12.11.1. Everything else (1.12.12 and 2.0.0) is ~arch.

Blessed be!

Pappy

----------

## drizzt

 *h2sammo wrote:*   

> /etc/conf.d/modules
> 
> ```
> # You can define a list modules for a specific kernel version,
> 
> ...

 

It's very easy.

You're very likely have upgraded to openrc/baselayout2. Therefor the configuration of kernel module loading has moved to /etc/conf.d/modules

You need to add a line:

```
# You can define a list modules for a specific kernel version,

# a released kernel version, a main kernel version or just a list.

#modules_2_6_23_gentoo_r5="ieee1394 ohci1394"

#modules_2_6_23="tun ieee1394"

#modules_2_6="tun"

#modules="ohci1394"

# own line starts here

modules="vboxdrv vboxnetflt"

# You can give modules a different name when they load - the new name

# will also be used to pick arguments below.

#modules="dummy:dummy1"

# Give the modules some arguments if needed, per version if necessary.

#module_ieee1394_args="debug"

#module_ieee1394_args_2_6_23_gentoo_r5="ieee1394 ohci1394"

#module_ieee1394_args_2_6_23="tun ieee1394"

#module_ieee1394_args_2_6="tun"

# You should consult your kernel documentation and configuration

# for a list of modules and their options.
```

In this example the virtualbox modules are marked for loading.

Hope this helps

----------

## h2sammo

thank you, make sense now.

i was globally unmasked (~amd64)

----------

## pappy_mcfae

I thought so.

Blessed be!

Pappy

----------

