Automatic driver module loading
Sorry, I know this is a sort of simple question, but I've looked through the kernel source, kernel docs, and other places, and can't find a clear answer.
Does the kernel automatically detect the hardware and load the appropriate drivers at boot by itself, without the distro's init scripts inserting them? I had thought that it did (especially with the way drivers in the 2.6 kernel register the PCI or USB IDs of the devices they handle), but I was less sure after I helped a friend set up MythTV on his Ubuntu box not too long ago. The integrated sound card had problems recording, so we opened it up and put in a sound card with a C-Media chip. When it booted, though, it wasn't detected until I manually modprobed the snd-cmipci module (and then Ubuntu showed the "found new device" balloon, etc.). If driver loading was fully automatic, then it should have loaded the module by itself, unless the driver was broken and didn't register the right PCI IDs (it's the latest version of Ubuntu, so I doubt that). Is this something with the distro? It's not really a problem, so I'm not looking for help, I'd just like to understand exactly what's going on as far as hardware detection.