Stop the kernel from pulling in dependency bloat when you only need one module

Kernel News & Module Management

Stop the kernel from pulling in dependency bloat when you only need one module

Technical Briefing | 10/17/2026

You spend half your morning trimming down your initramfs or stripping modules from a custom build, only to find the kernel pulling in a pile of junk you never asked for. It usually happens because a single line in a modules.dep file triggers a cascade of dependencies that the system insists are mandatory. This bit me in prod recently when a faulty NIC driver dragged in an entire legacy storage stack that caused a conflict during boot.

Why modprobe thinks it knows better than you

The kernel isn’t trying to be difficult, but modprobe treats dependency chains as gospel. If you attempt to load a module that has even a minor link to something else, you get the whole chain whether you want it or not. You can ignore dependencies, but doing that with modprobe -n is a great way to end up with a kernel panic or a hardware component that refuses to initialize because its bus controller is sitting in the void.

grep -E '^usb-storage|scsi_mod' /lib/modules/$(uname -r)/modules.dep

Taking back control

  • Use modprobe -r -v to track exactly what the kernel is unloading during your cleanup attempts
  • Check /etc/modprobe.d/blacklist.conf to ensure your blocked modules arent being pulled in by parent device drivers
  • Verify your initramfs configuration to see if it is explicitly dragging in deps during the early user space phase

If you are tired of the bloat, stop relying on modprobe for everything and start using insmod for specific test cases where you know the symbol requirements are satisfied. It won’t resolve deps for you, which is exactly why it is safer for debugging hardware issues. When you find the culprit, lock it down in a specific configuration file so your next kernel update doesn’t bring the mess back into your environment.

Linux Admin Automation  |  © www.ngelinux.com  |  10/17/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted