I'm installing a nixos system from my working and running nixos desktop (Thinkpad x220). After creating the partitions and filesystems, mounting to /mnt and /mnt/boot, editing the configuration I execute:
$ sudo nixos-install --root /mnt
building the configuration in /mnt/etc/nixos/configuration.nix...
copying channel...
installing the boot loader...
setting up /etc...
Copied "/nix/store/dzrd8yxh9r1bwisphg3z47dxrxlgskv1-systemd-237/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/nix/store/dzrd8yxh9r1bwisphg3z47dxrxlgskv1-systemd-237/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI".
Failed to create EFI Boot variable entry: No such file or directory
Traceback (most recent call last):
File "/nix/store/hkrdajjvfvzcwvknsvw2lhxacl0n6m6z-systemd-boot-builder.py", line 210, in <module>
main()
File "/nix/store/hkrdajjvfvzcwvknsvw2lhxacl0n6m6z-systemd-boot-builder.py", line 185, in main
subprocess.check_call(["/nix/store/dzrd8yxh9r1bwisphg3z47dxrxlgskv1-systemd-237/bin/bootctl", "--path=/boot", "install"])
File "/nix/store/lp7x6ziq5b2zihgad0i8a28xxvz5vnrr-python3-3.6.4/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/dzrd8yxh9r1bwisphg3z47dxrxlgskv1-systemd-237/bin/bootctl', '--path=/boot', 'install']' returned non-zero exit status 1.
Not sure.
"x86_64-linux"Linux 4.14.32, NixOS, 18.03.131953.cc95cbed4a2 (Impala)yesyesnix-env (Nix) 2.0"nixos-18.03.131953.cc95cbed4a2"/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgsAfter a quick look into bootctl sources (systemd), I'm taking a guess that your machine is booted in MBR/BIOS mode, not EFI.
Perhaps ask upstream for better error message?
I found that I cannot even use the drive in my device, so I'm not interested in this issue anymore. I'm sorry.
But I guess we can leave this open for documentation purposes? Or close it... I don't know.
Maybe this is a dupe of https://github.com/NixOS/nixpkgs/issues/38477
Did you change boot.loader.efi.canTouchEfiVariables? I set this to true in my most recent install and it failed with your exact message, but setting it to false actually made it work. Once it had then installed and I rebooted into the machine I could set it back to true again and everything worked fine.
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Most helpful comment
Maybe this is a dupe of https://github.com/NixOS/nixpkgs/issues/38477