Hi!
I’m trying to install NixOS in a oracle cloud account, using the “Always Free Tier” resources…
Actually i tried using nixos-infect, but without luck… I got some errors about nixos-rebuild not found, or some problems in the PATH with non-interactive shell sessions.
Also in the ARM instances, i always got errors about the /boot partition full.
Then i tried using the kexec method, but got a bunch of network errors…
i succeed using nixos-infect and Oracle Linux as base host. Actually no problems with x86 VMs, i managed to deploy both using deploy-rs. But i got a bunch of problems with the aarch64 ones:
bash: line 1: /run/current-system/sw/bin/nix-store: cannot execute binary file: Exec format error
error: cannot connect to 'root@XXX.XXX.XXX.XXX'
🚀 ❌ [deploy] [ERROR] Failed to push profile: Nix copy command resulted in a bad exit code: Some(1)
This while deploying with deploy-rs, and got this error while executing any nix related command:
I guess that the only option available for me is using kexec
But i have some questions about your gist; let’s say that i have an Ubuntu Host with IP 123.456.7.89.
I can connect to it with something like ssh -i /path/to/ssk-key ubuntu@123.456.7.89, upload the tar.gz built from the kexec.nix file, and run the kexec. But how can i reconnect within the kexec ?
Do i need to specify the public IP somewhere in the kexec.nix ?
No, DHCP will do its thing. You only need to specify public ssh key for root. kexec boot can take a long time so make sure to wait at least 5-10 minutes. You can debug kexec boot using vnc or serial connection.
tar: nix/store/rgk1qjfj70ajj5adwfibqsrp3sm5mhj5-extra-utils: Cannot mkdir: Read-only file system
tar: nix/store/rgk1qjfj70ajj5adwfibqsrp3sm5mhj5-extra-utils/lib/libudev.so.1: Cannot open: No such file or directory
tar: nix/store/rgk1qjfj70ajj5adwfibqsrp3sm5mhj5-extra-utils: Cannot mkdir: Read-only file system
tar: nix/store/rgk1qjfj70ajj5adwfibqsrp3sm5mhj5-extra-utils/lib/libuuid.so.1: Cannot open: No such file or directory
tar: nix/store/rgk1qjfj70ajj5adwfibqsrp3sm5mhj5-extra-utils: Cannot mkdir: Read-only file system
tar: nix/store/rgk1qjfj70ajj5adwfibqsrp3sm5mhj5-extra-utils/lib/libzstd.so.1: Cannot open: No such file or directory
tar: nix/store/rgk1qjfj70ajj5adwfibqsrp3sm5mhj5-extra-utils: Cannot mkdir: Read-only file system
tar: nix/store/rgk1qjfj70ajj5adwfibqsrp3sm5mhj5-extra-utils/sbin: Cannot open: No such file or directory
tar: nix/store/x90dhc8k96xpfa87p1bzwfcnhdjafihn-keymap: Cannot open: Read-only file system
tar: nix/store: Cannot utime: Read-only file system
tar: nix/store: Cannot change ownership to uid 0, gid 0: Read-only file system
tar: nix/store: Cannot change mode to rwxr-xr-x: Read-only file system
tar: Exiting with failure status due to previous errors