Danny Milosavljevic skribis: > * gnu/build/linux-boot.scm (boot-system): Load kernel modules only when > the hardware is present. > (lookup-module): Delete procedure. > * gnu/system/linux-initrd.scm (raw-initrd): Add imports. [...] > + (define (load-kernel-modules) > + "Examine /sys/devices to find out which modules to load and load them." > + (define enter? > + (const #t)) > + (define (down! directory stat result) > + ;; Note: modprobe mutates the tree starting with DIRECTORY. > + (let ((modalias-name (string-append directory "/modalias"))) > + (if (file-exists? modalias-name) > + (let ((modalias > + (string-trim-right (call-with-input-file modalias-name > + read-string) > + #\newline))) > + (system* "/sbin/modprobe" "-q" "--" modalias)))) If we change ‘flat-linux-module-directory’ to produce a ‘modules.alias’ file, here we could read ‘modules.aliases’ directly and load the right thing. With the patch below, we get ‘needed-modules’, and we could simply do: (for-each (catch-ENOENT load-linux-module*) (needed-modules (known-module-aliases (string-append linux-module-directory "/modules.alias")))) and we can do away with kmod’s modprobe. Thoughts? Ludo’.