-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Best way to handle an IP change after kexec
#415
Comments
kexec
kexec
I also experienced this, and would like to know how to handle it! |
you can increase the dhcp lease time on your dhcp server or set a static lease with the mac address of the machine. or one could start with |
For local machines where you can select boot mediums, I would recommend booting the NixOS images instead: https://github.com/nix-community/nixos-images?tab=readme-ov-file#iso-installer-images nixos-anywhere detects nixos installer. These images also have support for WiFi and nixos-anywhere can avoid kexec, which may not work with some hardware (i.e. some GPUs don't allow it). |
I fixed the issue by setting |
After the NixCon I was eager to try out nixos-anywhere and took an old mini PC so I can mess around a bit. It already had NixOS, but to make a real experiment, I installed Debian on it, so I can remotely distrohop.
After executing
nix run github:nix-community/nixos-anywhere -- --flake .#test [email protected]
, it was waiting for the host, but even after booting into nixos, it never reached it. A quickip addr
showed a different IP after the system was loaded, so of course it was unable to reach it again.I could have maybe forced the same IP address somehow, but I ended up opening a new shell session and executing a new command
nix run github:nix-community/nixos-anywhere -- --flake .#kenpachi [email protected] -i /tmp/tmp.abcde12345/nixos-anywhere
.a.b.c.d
was the old IP, whilea.b.c.e
was the new one (can be found on your routers settings, the host name should be something likenixos-installer
). I also had to provide the temporary SSH key for login/tmp/tmp.abcde12345/nixos-anywhere
, which is displayed in the first lines during the execution of the script.After fiddling around with this for an hour, it finally worked (I rarely use SSH keys, but it's a subject to change in the future!).
I am not sure if this has been mentioned somewhere in the documentation, so I wanted to ask if something like this should be also included? Maybe I am also mistaken and there is already a guide which slipped by me, while I was browsing the repo!
The text was updated successfully, but these errors were encountered: