The systemd-boot loader entries overwrite each other on a multiboot environment

Blockquote
-rwxr-xr-x 1 root root 12M 1. Sep 17:56 /efi/EFI/nixos/0mw34f58hcyl79l2w5dm6zd0dvfrvmgb-initrd-linux-5.15.63-initrd.efi
-rwxr-xr-x 1 root root 12M 1. Sep 17:56 /efi/EFI/nixos/7hxcn0dq3y6cf7rmh7n166cm5m2md5f8-initrd-linux-5.15.63-initrd.efi
-rwxr-xr-x 1 root root 7,8M 1. Sep 17:56 /efi/EFI/nixos/d5fyxq1dmqvsi094idns62mmp8rb89fz-linux-5.15.61-bzImage.efi
-rwxr-xr-x 1 root root 11M 1. Sep 17:56 /efi/EFI/nixos/dsvkr86x3dbg8234kggvazvycx6mrxds-initrd-linux-5.15.61-initrd.efi
-rwxr-xr-x 1 root root 7,8M 1. Sep 17:56 /efi/EFI/nixos/g84svn2snjpmz1n2nwyi6cy2vy43hc6q-linux-5.15.59-bzImage.efi
-rwxr-xr-x 1 root root 7,8M 1. Sep 17:56 /efi/EFI/nixos/gw4pw8yrywzizy5gpf181qjmrzik0h55-linux-5.15.63-bzImage.efi
-rwxr-xr-x 1 root root 7,8M 1. Sep 17:56 /efi/EFI/nixos/ik4rgsxdli426h7q4f566w06ad1zvp7j-linux-5.15.61-bzImage.efi
-rwxr-xr-x 1 root root 11M 1. Sep 17:56 /efi/EFI/nixos/jiqqfpcqk27b9xvkqvwrx7s533vjqvip-initrd-linux-5.15.59-initrd.efi
-rwxr-xr-x 1 root root 11M 1. Sep 17:56 /efi/EFI/nixos/vmndbyh241fc5m5k9zjp3dfykrhjwpdx-initrd-linux-5.15.61-initrd.efi
-rwxr-xr-x 1 root root 7,8M 1. Sep 17:56 /efi/EFI/nixos/yy2wxqc8kgp2cjcyhsw04w3dnrgbr0b8-linux-5.15.63-bzImage.efi
drwxr-xr-x 2 root root 4,0K 2. Sep 12:03 /efi/EFI/systemd
-rwxr-xr-x 1 root root 106K 8. Aug 14:35 /efi/EFI/systemd/systemd-bootx64.efi
drwxr-xr-x 3 root root 4,0K 30. Aug 16:10 /efi/f36445d5853345d59f5210a8374971ff
drwxr-xr-x 2 root root 4,0K 30. Aug 16:10 /efi/f36445d5853345d59f5210a8374971ff/5.19.5-arch1-1
-rwxr-xr-x 1 root root 50K 30. Aug 16:10 /efi/f36445d5853345d59f5210a8374971ff/5.19.5-arch1-1/amd-ucode.img
-rwxr-xr-x 1 root root 8,7M 30. Aug 16:10 /efi/f36445d5853345d59f5210a8374971ff/5.19.5-arch1-1/initrd
-rwxr-xr-x 1 root root 35M 30. Aug 16:10 /efi/f36445d5853345d59f5210a8374971ff/5.19.5-arch1-1/initrd-fallback
-rwxr-xr-x 1 root root 11M 30. Aug 16:10 /efi/f36445d5853345d59f5210a8374971ff/5.19.5-arch1-1/linux
drwxr-xr-x 3 root root 4,0K 2. Sep 12:19 /efi/loader
-rwxr-xr-x 1 root root 355 2. Sep 12:11 /efi/loader/34276f2da82b4396bcee52917a37c7a9-5.19.6-arch1-1.conf
drwxr-xr-x 2 root root 4,0K 2. Sep 12:09 /efi/loader/entries
-rwxr-xr-x 1 root root 283 30. Aug 19:35 /efi/loader/entries/34276f2da82b4396bcee52917a37c7a9-5.19.5-arch1-1.conf
-rwxr-xr-x 1 root root 355 2. Sep 12:13 /efi/loader/entries/34276f2da82b4396bcee52917a37c7a9-5.19.6-arch1-1.conf
-rwxr-xr-x 1 root root 373 2. Sep 12:13 /efi/loader/entries/34276f2da82b4396bcee52917a37c7a9-5.19.6-arch1-1-fallback.conf
-rwxr-xr-x 1 root root 186 30. Aug 14:13 /efi/loader/entries/arch4-linux.conf
-rwxr-xr-x 1 root root 185 30. Aug 14:04 /efi/loader/entries/eos8-linux.conf
-rwxr-xr-x 1 root root 357 30. Aug 16:10 /efi/loader/entries/f36445d5853345d59f5210a8374971ff-5.19.5-arch1-1.conf
-rwxr-xr-x 1 root root 375 30. Aug 16:10 /efi/loader/entries/f36445d5853345d59f5210a8374971ff-5.19.5-arch1-1-fallback.conf
-rwxr-xr-x 1 root root 434 1. Sep 17:56 /efi/loader/entries/nixos-generation-29.conf
-rwxr-xr-x 1 root root 434 1. Sep 17:56 /efi/loader/entries/nixos-generation-30.conf
-rwxr-xr-x 1 root root 434 1. Sep 17:56 /efi/loader/entries/nixos-generation-31.conf
-rwxr-xr-x 1 root root 434 1. Sep 17:56 /efi/loader/entries/nixos-generation-32.conf
-rwxr-xr-x 1 root root 434 1. Sep 17:56 /efi/loader/entries/nixos-generation-33.conf
-rwxr-xr-x 1 root root 434 1. Sep 17:56 /efi/loader/entries/nixos-generation-34.conf
^^^ These entries are overwritten by the last nix-rebuild --update invocation ^^^
-rwxr-xr-x 1 root root 6 29. Aug 19:38 /efi/loader/entries.srel
-rwxr-xr-x 1 root root 61 1. Sep 17:56 /efi/loader/loader.conf
-rwxr-xr-x 1 root root 61 2. Sep 11:54 /efi/loader/loader.conf_nixos34
-rwxr-xr-x 1 root root 32 2. Sep 12:19 /efi/loader/random-seed

The boot loader entry names should include the hopefully distinct node name of the nixos instance or a parameter which can be set in the configuration.nix.

The current mechanism is not useable for multi-boot environments and systemd-boot.

Hosted by Flying Circus.