I use microcore for a simple specific task which only needs to be able to change a file on an ntfs partition. I grab vmlinuz + core.gz from the downloads, extract and modify the core.gz cpio archive, repack it, make hybrid iso, write it to a usb flash drive and I'm in business. I remove quite a bit of stuff from core.gz, and end up with about a 6MB iso file (takes about 15 seconds total to boot and do what I need to do).
I have been using this for quite some time, and have learned quite a bit while modifying it for my needs.
Recently, I ran into a problem on a certain pc where the usb keyboard (only usb ports on pc) would not work after it booted up. After some troubleshooting (a little difficult without a functioning keyboard), I discovered it needed the xhci-hcd module loaded before the keyboard would work (didn't matter which usb port used, without xhci-hcd loaded- no keyboard). Since I remove all modules when modifying core.gz, the simple fix was to keep module xhci-hcd.ko.gz, create an entry in the init script to insmod that module, which works fine.
My question- how does the kernel know whether to load a module or not?
(I used the standard core iso download to troubleshoot my problem- it loaded the xhci-hcd module 'automatically'. Is udevd, which is started in tc-config, responsible for this?)
1. module already built into kernel- already loaded
2. specifically tell kernel to load it (insmod, modprobe, etc)
3. ? <---if not built in, and I don't tell it to load, how did it get loaded?