Please read the full question before attempting to answer, this is a bit oddball of a situation.
I support a lot of server hardware test functionality, and essentially end up managing several internal Linux distributions, supporting various kernels (and, in a bit, CPU architectures as well). These servers are PXE/iPXE-booted from minimal test images (to save on server load and boot time) that would double in size if I were to include the make tools and gcc on them.
The trick is this. Prior to boot, I don't know what will be in any given system, which means that I need to download and install kernel modules on the fly once the system has booted. These kernel modules obviously need to be a) pre-built, and b) match the running kernel. (We expect to have dozens.)
My question is this: What's the appropriate way to manage these kernel modules? I essentially need to specify a kernel the same way I specify an architecture, but to my knowledge yum (on Centos 7) has no way to say "I need a package built for X kernel." I'm less familiar with apt-get (Ubuntu), but I don't believe it has a way to do that either. Is there a way out of essentially building a parallel package management system for this? (This is essentially managing a meta-distribution...)