Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync command not found with 23.11 nixos image #260

Open
Tommixe opened this issue Dec 2, 2023 · 10 comments
Open

rsync command not found with 23.11 nixos image #260

Tommixe opened this issue Dec 2, 2023 · 10 comments

Comments

@Tommixe
Copy link

Tommixe commented Dec 2, 2023

nixos-anywhere fails at copy extra file step using as installation target a machine booted with nixos 23.11 minimal iso image:
https://channels.nixos.org/nixos-23.11/latest-nixos-minimal-x86_64-linux.iso

nixos-anywhere command:
nix run github:numtide/nixos-anywhere -- --extra-files "$temp" --flake .#server02 root@$192.168.178.191

This is the error:

+ echo '### Copying extra files ###'
### Copying extra files ###
+ rsync -rlpv -FF -e 'ssh -i "/tmp/tmp.eYUCcg96wX"/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ' /tmp/tmp.Ol4VOcuUb6/ root@192.168.178.191:/mnt/
Warning: Permanently added '192.168.178.191' (ED25519) to the list of known hosts.
bash: line 1: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(231) [sender=3.2.7]
+ rm -rf /tmp/tmp.eYUCcg96wX

Using the 23.05 image installation works without any issue.

@Mic92
Copy link
Member

Mic92 commented Dec 24, 2023

We should probably start making our own ISOs that have all needed tools.

@Ramblurr
Copy link

Ramblurr commented Feb 8, 2024

Is there a workaround, besides using the 23.05 image?

Something like this before the nixos-everywhere call works:

ssh root@hostname "nix-env -iA nixos.rsync"

@Mic92
Copy link
Member

Mic92 commented Feb 9, 2024

Another work around is building your own installer. nixos-generators works well for that.

@Lassulus
Copy link
Contributor

Lassulus commented Mar 26, 2024

maybe we can do a fallback with nix-shell? or even nix-env?

@0x4A6F
Copy link

0x4A6F commented Mar 26, 2024

Editing /etc/nixos/configuration.nix and adding rsync to systemPackages with a nixos-rebuild test also works on current minimal iso.

  environment.systemPackages = with pkgs; [
    rsync
  ];

@Lassulus
Copy link
Contributor

hmm, but thats a lot of hassle. Maybe we should just port the rsync code to scp?

@Lassulus
Copy link
Contributor

#295 is the PR for that, not tested yet

@Mic92
Copy link
Member

Mic92 commented Apr 30, 2024

We also create a new nixos-anywhere optimized installer image that has rsync installed and enables sshd by default: https://github.com/nix-community/nixos-images?tab=readme-ov-file#iso-installer-images

@uPaymeiFixit
Copy link

uPaymeiFixit commented May 1, 2024

We also create a new nixos-anywhere optimized installer image that has rsync installed and enables sshd by default: nix-community/nixos-images#iso-installer-images

I saw this a few days ago and could not for the life of me figure out where the ISOs are actually hosted. I'm new to nix and figure I must misunderstand how it works.

EDIT: Found it. I mistook the assets for releases.

@Prince213
Copy link
Contributor

To anyone who is looking at this, #316 (or #325) has been merged and it solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants