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

grub: support initrd secrets #38263

Merged
merged 1 commit into from Jun 6, 2018
Merged

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

This PR fixes #26175 by adding support for boot.initrd.secrets to grub.

Things done

The Grub specific option boot.loader.grub.extraInitrd (#22969) is removed in favor of the generic boot.initrd.secrets option. My implementation is similar to how extraInitrd was implemented, except it runs append-initrd-secrets instead of using a user supplied initrd. I use a separate second initrd, rather than appending to the main initrd (as is done for systemd-boot), because grub allows the option of not copying the initrd from the nix store, so it may be immutable.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@lopsided98
Copy link
Contributor Author

There doesn't seem to be a single maintainer for grub so I'll just cc @joachifm. Let me know if someone else would be better to review this.

@joachifm
Copy link
Contributor

joachifm commented Apr 8, 2018

Looks okay to me. A changelog entry would be nice.

@lopsided98
Copy link
Contributor Author

I added a changelog entry.

@lopsided98
Copy link
Contributor Author

Is there anything preventing this from being merged?

@lopsided98
Copy link
Contributor Author

@joachifm Can this be merged?

@joachifm joachifm merged commit c06d795 into NixOS:master Jun 6, 2018
joachifm added a commit that referenced this pull request Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support initrd secrets in GRUB
3 participants