nix-community/nixos-anywhere

Stuck with: `Couldn't execute fish -c "echo started"`

Closed this issue · 1 comments

I am trying to deploy a NixOS instance on GCE using the nixos-anywhere-example.

I am currently stuck with following output:

>  nix run github:numtide/nixos-anywhere -- --flake ./#gce --build-on-remote --debug  root@35.233.50.181
...
### Formatting hard drive with disko ###
+ nix_copy --to ssh://root@35.233.50.181 /nix/store/1qd68k9816q88bbs9nwxcrr8hyspww9w-disko
+ NIX_SSHOPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /tmp/tmp.Ao8jULgVpw/nixos-anywhere '
+ nix copy --extra-experimental-features 'nix-command flakes' --no-write-lock-file -L --substitute-on-destination --to ssh://root@35.233.50.181 /nix/store/1qd68k9816q88bbs9nwxcrr8hyspww9w-disko
Warning: Permanently added '35.233.50.181' (ED25519) to the list of known hosts.
Couldn't execute fish -c "echo started": No such file or directory

It is not exiting after that.

As I am on MacOS I also tried running it using my linux-builder with the same result.

Setting SHELL=bash returns similar output:

Couldn't execute bash -c "echo started": No such file or directory 

I looked at both sources (nixos-anywhere and disko) and I am unable to find any line that could produce this kind of output.

What might be the error in my approach, or what else should I consider to fix it?

This issue is similar to Issue #147. It happens when nix copy gets stuck due to a large discrepancy in Nix versions.
I'm not entirely sure, but I believe the discrepancy is between the locally defined Nix version in nixos-anywhere (2.16) and the Nix version (2.13) in the remotely booted kexec installer image.
I had to set my local version to 2.13 (nixVersions.nix_2_13), because 2.16 did not work for me.