-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/stage-1: Do not allow missing kernel modules in initrd #78430
Conversation
Does setting |
interesting, setting it to false worked as expected for me.. |
This comment has been minimized.
This comment has been minimized.
one-line diff, still valid, tyvm |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Tagging @edolstra for review since they where the last person to set that value. |
It was probably set to |
Actually this creates an issue, because |
opened #109030 |
This makes it really annoying to use NixOS with a custom built kernel. There is a whole bunch of modules that get added to the initrd "by default" in nixos/modules/system/boot/kernel.nix and can't easily be removed:
My kernel doesn't build some of these modules, and now that's breaking the initrd build. Maybe I've missed an obvious way to get rid of these defaults without also breaking the multiple places that merge into this list in other NixOS modules? |
This commit also broke our aarch64 ISO build and thus is blocking
|
Does |
I can't find any reference of |
|
So we make such parts conditional, I guess.
|
Strange, I didn't find it, maybe was in the wrong directory.
Yes this module should only be added conditional on the target arch then. Actually according to the last succeeding build all of these probably don't work on aarch: |
Looking at the comment from @delroth and the |
I didn't want to spend time looking deeper, so I just unblocked the channel in 8ca3383. Feel free to work out a more proper solution (or revert some of these). |
I've opened #109280 to discuss some of the implications resulting from this breaking change (see "Open/unresolved issues to consider" and "Potential improvements"). I'm not sure how many users this will affect but just in case I started to collect some ideas how we could try to help with the transition (updating |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/failed-to-build-kernel-with-nix-flake/11971/3 |
Another user (@etu) bit by this breaking change |
It would be great if this option was configurable... It's a bit cumbersome to have to maintain a nixpkgs fork with only this option change to build images for non-supported platforms. |
|
Motivation for this change
I, and others I've talked to, have repeatedly hit the issue where we accidentally typo a name of a kernel module in
boot.initrd.availableKernelModules
, and wonder why e.g. the disk won't mount. Turns out, the code explicitly allows this to happen! This fixes that.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)