nix-community / lanzaboote

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

Specialisations don't seem to be idenifiable in systemd boot menu #394

Open fsbof opened 1 month ago

fsbof commented 1 month ago

Once secure boot is enabled using Lanzaboote the name of the specialisation seems to be removed from each boot entry or is perhaps truncated from view on the right side of the screen. This is what I see.

NixOS Uakari My-Comment-Two (Linux 6.6.51) (Generation 10, Built on 2024-10-13) (nixos-generation-10
NixOS Uakari My-Comment-Two (Linux 6.6.51) (Generation 10, Built on 2024-10-13) (nixos-generation-10
NixOS Uakari My-Comment-Two (Linux 6.6.51) (Generation 10, Built on 2024-10-13) (nixos-generation-10

Would it be possible to put the specialisation back in the front of each boot entry?

Please also see my related question on discourse.

For reference, without Lanzaboot this is typically what the same entries would look like with two specialisations testA and testB

NixOS (Generation 9 NixOS Uakari My-Comment-One (Linux 6.6.51), built on 2024-10-10)
NixOS (testB) (Generation 9 NixOS Uakari My-Comment-One (Linux 6.6.51), built on 2024-10-10)
NixOS (testA) (Generation 9 NixOS Uakari My-Comment-One (Linux 6.6.51), built on 2024-10-10)
fsbof commented 1 month ago

I tried a shorter system.nixos.label with lib.mkForce this morning.

Main config -> system.nixos.label = "main"; Specialisation -> system.nixos.label = lib.mkForce "testA";

The label from the specialisation was applied to both boot entries.

   NixOS Uakari testA (Linux 6.6.51) (Generation 5, Built on 2024-10-14) (nixos-generation-5.efi)   
NixOS Uakari testA (Linux 6.6.51) (Generation 5, Built on 2024-10-14) (nixos-generation-5-specialisa

What was interesting here, is that with a very short label I can see the start of the word specialisation at the end of the boot string, being cropped by an apparent 100 char display limit for systemd, even though I have extra room on the screen. I have tried the various console options, but nothing seems to show more than 100 characters.

nixos-discourse commented 1 month ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/setting-boot-labels-with-system-nixos-label-systemd-and-secure-boot/54285/2