diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-30 08:57:17 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-06 14:35:34 +0100 |
commit | d9105c28c8ca979fc1e55ba2f30511cbc36efa5a (patch) | |
tree | 57cb17f6c9a2964b4ca379160a6f41405d75b402 /nixos/modules/system/boot/stage-1.nix | |
parent | e55c73a6f4d024086144b61ce6da4aa42dbeaa61 (diff) | |
download | nixpkgs-d9105c28c8ca979fc1e55ba2f30511cbc36efa5a.tar nixpkgs-d9105c28c8ca979fc1e55ba2f30511cbc36efa5a.tar.gz nixpkgs-d9105c28c8ca979fc1e55ba2f30511cbc36efa5a.tar.bz2 nixpkgs-d9105c28c8ca979fc1e55ba2f30511cbc36efa5a.tar.lz nixpkgs-d9105c28c8ca979fc1e55ba2f30511cbc36efa5a.tar.xz nixpkgs-d9105c28c8ca979fc1e55ba2f30511cbc36efa5a.tar.zst nixpkgs-d9105c28c8ca979fc1e55ba2f30511cbc36efa5a.zip |
nixos/stage-1: create initramfs /lib at build time
Modules built in to the kernel can attempt to load firmware before init is started. To guarantee the firmware is accessible to them where they expect, /lib has to exist in the initramfs — it can't be created later by init, because by that point the module may already have tried and given up.
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index a3551f68dbe..f139902cdc8 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -307,7 +307,7 @@ let ${pkgs.buildPackages.busybox}/bin/ash -n $target ''; - inherit linkUnits udevRules extraUtils modulesClosure; + inherit linkUnits udevRules extraUtils; inherit (config.boot) resumeDevice; @@ -349,6 +349,9 @@ let [ { object = bootStage1; symlink = "/init"; } + { object = "${modulesClosure}/lib"; + symlink = "/lib"; + } { object = pkgs.runCommand "initrd-kmod-blacklist-ubuntu" { src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; preferLocalBuild = true; |