# Autodetect Hardware and load modules

## d4mo

Ok, I know how to compile a kernel and hwo to do all that stuff.  But I was just curious as to how you get hardware to autodetect and load the correct modules(the way live CD's do).  Not that I want to do it right now, but I'm curious as to how that works.Last edited by d4mo on Fri Mar 09, 2007 4:55 am; edited 1 time in total

----------

## d4mo

bump

I'd really like to know how this happens.  Is it something in the kernel that does it?  Is it a program?  or what?

----------

## Section_8

This is just a guess - but udev will now autoload modules (it does what coldplug used to do).   So if you configure your kernel to compile *eveything* as a module, udev should load the ones you need.

----------

## d4mo

Is there something special you have to do for that then?  Becuase udev is running on my system, and I have the drivers for my sound card as a module and it doesn't autoload them(I know I can do it with modules.autoload.d but I'm trying to figure out this udev business)

EDIT:

Well I updated my kernel to 2.6.18.6 from 2.6.12.3 and now it autoloads modules.  So I guess now my question is how do I make it stop haha.

----------

## Section_8

You don't want udev to autoload modules?  You could look at RC_COLDPLUG in /etc/conf.d/rc

----------

## dtjohnst

 *d4mo wrote:*   

> Is there something special you have to do for that then?  Becuase udev is running on my system, and I have the drivers for my sound card as a module and it doesn't autoload them(I know I can do it with modules.autoload.d but I'm trying to figure out this udev business)
> 
> EDIT:
> 
> Well I updated my kernel to 2.6.18.6 from 2.6.12.3 and now it autoloads modules.  So I guess now my question is how do I make it stop haha.

 

There's a kernel option for "autoload modules" as well. If you deselect that, it might be all you need.

----------

## Alejandro Nova

How can I control the order of udev's autoloading? I have a Sound Blaster Live, and I want to load snd-emu10k1 before any other sound driver, because I don't want my OSS apps to believe that my default sound card is... my modem.

----------

## didymos

 *dtjohnst wrote:*   

> There's a kernel option for "autoload modules" as well. If you deselect that, it might be all you need.

 

That disables all module autoloading, not just the annoying instances where udev loads something even when you don't have the module in /etc/modules.autoload.d/kernel-2.6. There's also blacklisting, but that disables all autoloading for individual modules, so it'll make udev stop loading something, but if you want that module to load later in the boot process, you're screwed.

----------

