build initramfs: explain modprobe?
What properties of modprobe are essential for building initramfs? Modprobe works for only one kernel module at a time, and this is a cause of slowness. For instance, computing the transitive closure of the Requires relationship over a non-small set of modules can be performed faster by loading modules.dep into a bash associative array, then processing in bash. Also, modinfo now is invoked once per module to find firmware, but this can be sped up by invoking on batches of modules, using "split -C 32000" to avoid the argsize limit of execve.
Invoking modprobe with --ignore-install seems to remove any effects due to (possibly host-specific) /etc/modules.d/*.conf. Is there anything else that modprobe does for building initramfs, other than transitive closure of Requires?
A message that is not in the archive (sent off-list or not yet received): 4E5D68A0.8020006-Po6cBsTGB2ZWk0Htik3J/[email protected]
Quoted 9 lines · John Reiser
What properties of modprobe are essential for building initramfs? Modprobe works for only one kernel module at a time, and this is a cause of slowness. For instance, computing the transitive closure of the Requires relationship over a non-small set of modules can be performed faster by loading modules.dep into a bash associative array, then processing in bash. Also, modinfo now is invoked once per module to find firmware, but this can be sped up by invoking on batches of modules, using "split -C 32000" to avoid the argsize limit of execve.
Quoted 5 lines
Invoking modprobe with --ignore-install seems to remove any effects due to (possibly host-specific)
/etc/modules.d/*.conf. Is there anything else that modprobe does for building initramfs, other than transitive closure of Requires?
Hmm, you are right. Modules loaded in "/etc/modules.d/*.conf" are not honored. And yes, "modprobe" is only used to easily get the requirements.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines
Quoted 2 lines
What properties of modprobe are essential for building initramfs? [snip]
And yes, "modprobe" is only used to easily get the requirements.
Explicitly:
0) Expand short names: "pcmcia" ==> "kernel/drivers/pcmcia/pcmcia.ko".
1) Compute transitive closure of Requires from modules.dep.
2) Ignore modules listed in modules.builtin.
3) Handle aliasing of underscore and minus:
"usb_storage" ==> "usb-storage".