Skip to content
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/kernel.nix: ensure same kernel is used #87856

Open
wants to merge 1 commit into
base: master
from

Conversation

@eadwu
Copy link
Member

eadwu commented May 15, 2020

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@eadwu eadwu mentioned this pull request May 15, 2020
2 of 10 tasks complete
@eadwu eadwu marked this pull request as ready for review May 15, 2020
@eadwu eadwu requested review from delroth and bendlas May 15, 2020
@eadwu eadwu mentioned this pull request May 15, 2020
2 of 10 tasks complete
@eadwu eadwu force-pushed the eadwu:kernel/same-kernel branch from 068f0d7 to 6e2f31b May 23, 2020
@wizeman
Copy link
Member

wizeman commented Jun 19, 2020

I can't tell if this is doing the right thing because I get confused with the overriding mechanisms.
However, I was having the issue described in #86835, which for me meant NixOS wouldn't boot since I was using ZFS boot and root filesystems.
This PR fixed the issue for me.

@Ekleog
Copy link
Member

Ekleog commented Jun 26, 2020

Would it be possible to git commit --amend to explain why this is required, and how this solves the listed issue?

Originally, changes to the kernel don't propagate to the other
derivation within the same package set. This commit allows for the
changes in the kernel to be propagated.

A distinct example is setting `boot.kernel.randstructSeed` to a non-zero
length string which would result in building 2 kernels, one with the
correct seed and the other with the zero length seed. Then, when using
an out-of-tree kernel driver, it would be built with the zero length
seed which differs from the non-zero length seed used to boot,
contradicting the purpose of the `boot.kernel.randstructSeed`.
@eadwu eadwu force-pushed the eadwu:kernel/same-kernel branch from 6e2f31b to 86456e8 Jun 27, 2020
@eadwu
Copy link
Member Author

eadwu commented Jun 27, 2020

Yeah a better fix would probably be fixing the extend override, but I'm not sure it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.