Nixos-rebuild in nixos-enter giving a spurious "no such file or directory"

This post came up when I was trying to restore the bootloader from a live ISO.

I had thought that from nixos-enter, I could treat the shell as if I was in that NixOS system, & so re-run nixos-rebuild; but, I ran into the error message that comes up in this thread. (The nixos system inside the chroot had an older version of nix).

Coming across another post here helped, since it pointed to much more straightforward instructions in the NixOS wiki for what I was trying to do: Bootloader - NixOS Wiki

NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot
1 Like