How does the kernel know which modules to load?
When you boot Linux, the kernel mostly loads drivers for your hardware automatically without you needing to specify them in /etc/modules.d. But how does it find them?
I ask because I have a handmade system originally based on Slackware 13.37 and I am in the process of upgrading it to Slackware 14. I built my new kernel using the same configuration file as before (except for setting DEVTMPFS and DEVTMPFS_MOUNT because modern udevs require them). I upgraded udev, removed module-init-tools (which Slack 14 doesn't use) and installed kmod instead.
The system boots but it no longer loads most of my drivers. In particular my ethernet card doesn't work and there is no usb. I can still load the drivers by hand and they work fine but they aren't loaded automatically any more.
I have some interesting udevd errors which may be relevant:
Bind failed. No such file or directory
udevd error binding udev control
Unfortunately they don't say which file or directory is causing the problem and they don't appear in any of the system logs so I can't tell at what point they occur.
Is it actually udev that loads the drivers?