nix-community / lanzaboote

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

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

Open Mic92 opened 1 month ago

Mic92 commented 1 month 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 1 month ago

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

blitz commented 1 month ago

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

Mic92 commented 1 month 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 1 month ago

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