-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Closed
Description
If a Linux kernel does not have /proc/sys/kernel/modprobe due to having CONFIG_MODULES=n or unset in their Kconfig, then nixos-init will crash, where the traditional activation will not
nixpkgs/pkgs/by-name/ni/nixos-init/src/activate.rs
Lines 43 to 55 in d0c03e4
| const MODPROBE_PATH: &str = "/proc/sys/kernel/modprobe"; | |
| fs::write( | |
| MODPROBE_PATH, | |
| modprobe_binary.as_ref().as_os_str().as_encoded_bytes(), | |
| ) | |
| .with_context(|| { | |
| format!( | |
| "Failed to populate modprobe path with {}", | |
| modprobe_binary.as_ref().display() | |
| ) | |
| })?; | |
| Ok(()) |
The error you can observe if you built a non-modular kernel is as follows:
[ OK ] Reached target Switch Root.
Starting Switch Root...
initrd-init[224]: Failed to populate modprobe path with /nix/store/sivh663fa3pjz7mh8v8g5ilhl7kwvxr4-kmod-aarch64-unknown-linux-musl-31/bin/modprobe: No such file or directory (os error 2).
[FAILED] Failed to start Switch Root.
systemd[1]: Failed to start Switch Root..service' for details.
This is relevant to #428908
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels