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/{bcache,lvm}: enable when using systemd in stage 1 initrd #343760

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

JohnRTitor
Copy link
Contributor

Description of changes

Fixes #343566

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ElvishJerricco
Copy link
Contributor

This is part of a slightly bigger change I wanted to make this week. LVM, bcache (not fs), and swraid are all things that work by default in scripted initrd but not systemd initrd. As much as I would prefer for these things to be detected with nixos-generate-config, I think we should just enable them all by default in systemd initrd. We did already do the work to have swraid detected, including stateVersion-based compatibility logic for existing configs, but I think it would be better to just revert that and enable it by default.

It'd be nice to get it all done at once, if you feel comfortable adding those other two things to this PR. If not, I can do it in another PR.

@JohnRTitor
Copy link
Contributor Author

Sure but I don't think there is boot.initrd.swraid.enable?

bcache is pretty straightforward like this.

@JohnRTitor JohnRTitor changed the title nixos/lvm: enable lvm when using systemd in stage 1 initrd nixos/{bcache,lvm}: enable when using systemd in stage 1 initrd Sep 22, 2024
@ElvishJerricco
Copy link
Contributor

Yea, swraid is just controlled by boot.swraid.enable.

@JohnRTitor
Copy link
Contributor Author

Yea, swraid is just controlled by boot.swraid.enable.

Where do I enable this then? It is enabled by default AFAIK.
image

@JohnRTitor JohnRTitor merged commit cb9ac60 into NixOS:master Oct 10, 2024
28 checks passed
@JohnRTitor JohnRTitor deleted the systemd-lvm branch October 10, 2024 06:46
@JohnRTitor
Copy link
Contributor Author

I have merged this, swraid fix can be figured out later.

@ElvishJerricco
Copy link
Contributor

It is enabled by default AFAIK

@JohnRTitor No it isn't? It's only enabled by default with a sufficiently old stateVersion.

JohnRTitor added a commit to JohnRTitor/nixpkgs that referenced this pull request Oct 12, 2024
it is detected automatically now according to NixOS#343760 (comment), so enable it by default
@JohnRTitor
Copy link
Contributor Author

@ElvishJerricco Done, opened #348134. I don't use this feature/and don't know how it works, so further action on my part won't be possible.

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.

Systemd-based stage-1 initrd can't mount the root partition if it's inside LVM
2 participants