Stop module load order from making your custom hardware act like a brick
Technical Briefing | 11/18/2026
You spend all afternoon compiling a custom driver, insmod it, and it works perfectly. You reboot the box for an unrelated kernel update, and suddenly your hardware is nowhere to be found. The kernel decided to initialize a different module first, claimed the IRQ, and left your driver sitting in the cold. It is a classic race condition in the boot sequence that most tutorials skip entirely.
When built-in priorities bite back
Most of the time, the kernel handles dependency resolution fine. But once you start dealing with custom vendor blobs or complex out-of-tree hardware, the internal dependency graph gets fuzzy. The kernel often defaults to loading alphabetically or based on the order it scans the bus, which is a recipe for disaster if your module requires a specific parent driver to be ready first. Don’t rely on the kernel guessing correctly.
echo 'install my_custom_driver /sbin/modprobe -i existing_parent_driver && /sbin/modprobe --ignore-install my_custom_driver' > /etc/modprobe.d/custom-load.conf
- Use modprobe.d files to force an explicit stack instead of relying on luck during boot.
- Check /proc/modules to see what is currently holding onto resources before you manually trigger a probe.
- Avoid using /etc/modules for hardware that requires specific ordering; it is often too blunt of a tool.
If you are still hitting weird probe failures, peek at your initramfs configuration. Sometimes the initrd image pulls in modules in a different order than the live system. Rebuild it after modifying your modprobe config so the early boot phase sees your constraints. A few minutes spent pinning these dependencies now will save you a midnight incident when a routine reboot inevitably triggers the wrong initialization path.
