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

boot: Development (& experimental) setup for SecureBoot #202497

Closed

Conversation

RaitoBezarius
Copy link
Member

@RaitoBezarius RaitoBezarius commented Nov 23, 2022

Description of changes

This is a PR being worked on, which should introduce a new stub (*) after systemd-boot, to boot a NixOS system with SecureBoot while keeping the nice properties about having a small ESP and many generations.

(*): So the idea has came while discussing it with @nikstur @blitz

TODO before going out of draft:

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

cole-h and others added 13 commits August 4, 2022 15:54
`bootDisk` was generated manually in a runVM command, this is now
refactored using `make-disk-image` facility, enabling:

- a better name: `systemImage` rather than `bootDisk`, i.e. bootDisk
  contained more than only the boot files in fact
- support for arbitrary additional paths & contents with permissions &
  ownership, not exposed yet through public API though
- UEFI firmware manipulation at make-disk-image time, e.g. SecureBoot
  can be tested
- EFI firmware usage is simplified
- bootDisk / rootDisk are clearly separated to support the case when we
  do not want the default filesystem, but still want a bootloader, or do
  not want bootloader but still want the default root filesystem, etc.
- no multiple disk when it is not needed
- OVMF firmware can be compiled with SMM support ;
- make-disk-image can enforce SMM ;
- QEMU test infrastructure can enforce SMM ;
- disable by default because it seems broken on OVMF
@Mic92
Copy link
Member

Mic92 commented Dec 17, 2022

This needs a rebase now.

@RaitoBezarius
Copy link
Member Author

This needs a rebase now.

Will take care of this in the day.

@RaitoBezarius
Copy link
Member Author

RaitoBezarius commented Dec 17, 2022

Actually, all that's necessary now is #203641 (for tests only.) rebased with #172237.

I will clean up this PR later to prepare feature preview of SecureBoot in-tree.

@infinisil infinisil added the significant Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc. label Apr 19, 2023
@RaitoBezarius
Copy link
Member Author

Closed in favor of #231951.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants