nix-community / lanzaboote

Secure Boot for NixOS [maintainers=@blitz @raitobezarius @nikstur]
GNU General Public License v3.0
916 stars 44 forks source link

fix(tool): better error if public key is missing #382

Closed Mic92 closed 1 month ago

Mic92 commented 3 months ago

Old:

building the system configuration...
Installing Lanzaboote to "/boot"...
Failed to install generation.: No such file or directory (os error 2)
Failed to install bootloader
warning: error(s) occurred while switching to the new configuration

New:

building the system configuration...
Installing Lanzaboote to "/boot"...
Failed to install generation 1: Get stub name: Read public key '/etc/secureboot/keys/db/db.pem': No such file or directory (os error 2)
Failed to install bootloader
warning: error(s) occurred while switching to the new configuration

Mic92 commented 3 months ago

Turns out that switching to overlay mounts also wiped my lanzaboote key.

blitz commented 3 months ago

@Mic92 I love the error messages! Any idea what happened to the CI?

Mic92 commented 3 months ago

@blitz we just upgraded our CI server in nix-community and looks like the database state was discarded. Hopefully nix-community now works more stable overall, so I can remove my own buildbot eventually.

kuflierl commented 3 months ago

Love the much clearer error message. I am also working on a similar problem with #384