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/systemd-boot: create boot entries for specialisations #108338

Merged
merged 1 commit into from Oct 31, 2021

Conversation

lukegb
Copy link
Contributor

@lukegb lukegb commented Jan 3, 2021

Motivation for this change

Some specialisations (such as those which affect various boot-time
attributes) cannot be switched to at runtime. This allows picking the
specialisation at boot time.

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.

@lukegb
Copy link
Contributor Author

lukegb commented Jan 3, 2021

@ofborg test systemd-boot

@lukegb
Copy link
Contributor Author

lukegb commented Jan 3, 2021

@ofborg eval

1 similar comment
@lukegb
Copy link
Contributor Author

lukegb commented Jan 3, 2021

@ofborg eval

@lukegb lukegb force-pushed the systemd-boot-specialisations branch from d483cee to b9205e4 Compare January 9, 2021 04:48
@lukegb lukegb requested a review from FRidh January 9, 2021 04:49
@misuzu
Copy link
Contributor

misuzu commented Jun 18, 2021

What about grub? Does it support booting into specializations?

@Gerschtli
Copy link
Contributor

What is the current status of that? I would like to see that feature being merged :)

Also would like to help if needed.

@Gerschtli
Copy link
Contributor

@misuzu as far as I understand the documentation and the source code, yes it is supported for grub. This PR just enables the same behaviour for systemd-boot as available for grub already.

@Gerschtli
Copy link
Contributor

Ping @Mic92 (sorry if you are not the right one, but please review or ping a maintainer who is able to do it) to raise awareness of this feature mismatch between grub and systemd-boot.

@lukegb Could you please rebase your changes on latest master?

@FlorianFranzen
Copy link
Contributor

I rebased the commit here on the latest master. @lukegb @Mic92 @FRidh What is missing to get this merged. It would be nice to treat specialisations properly when using systemd-boot.

@ryanswrt
Copy link

Willing to sponsor work on this to get it over the line, relatively critical for my use-case.

@lukegb lukegb force-pushed the systemd-boot-specialisations branch from b9205e4 to 4599f0a Compare October 31, 2021 11:11
@lukegb
Copy link
Contributor Author

lukegb commented Oct 31, 2021

@ofborg test systemd-boot

Some specialisations (such as those which affect various boot-time
attributes) cannot be switched to at runtime. This allows picking the
specialisation at boot time.
@Mic92
Copy link
Member

Mic92 commented Oct 31, 2021

Looks good to me except the comment above. I have not tested it yet.

@lukegb lukegb force-pushed the systemd-boot-specialisations branch from 4599f0a to 13fad0f Compare October 31, 2021 11:40
@lukegb
Copy link
Contributor Author

lukegb commented Oct 31, 2021

I think this probably needs a larger refactoring to swap what I named "SystemIdentifier" to a proper dataclass or something. But I think that's probably deserving of a separate change.

@Mic92 Mic92 merged commit 7469b8b into NixOS:master Oct 31, 2021
@Mic92
Copy link
Member

Mic92 commented Oct 31, 2021

I tested systemd-boot with and without specialisations. Both works for me.

@lukegb lukegb deleted the systemd-boot-specialisations branch December 5, 2022 01:22
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.

None yet

9 participants