Open erdnaxe opened 1 day ago
When running nixos-infect on a brand new Contabo VPS running Ubuntu 22.04, I get the following crash:
[...] deleting unused links... note: currently hard linking saves -0.00 MiB 174 store paths deleted, 377.98 MiB freed + [[ -L /etc/resolv.conf ]] + mv -v /etc/resolv.conf /etc/resolv.conf.lnk renamed '/etc/resolv.conf' -> '/etc/resolv.conf.lnk' + cat /etc/resolv.conf.lnk + '[' -n '' ']' + touch /etc/NIXOS + echo etc/nixos + echo etc/resolv.conf + echo root/.nix-defexpr/channels + cd / + ls etc/ssh/ssh_host_dsa_key etc/ssh/ssh_host_dsa_key.pub etc/ssh/ssh_host_ecdsa_key etc/ssh/ssh_host_ecdsa_key.pub etc/ssh/ssh_host_ed25519_key etc/ssh/ssh_host_ed25519_key.pub etc/ssh/ssh_host_rsa_key etc/ssh/ssh_host_rsa_key.pub + rm -rf /boot.bak + isEFI + '[' -d /sys/firmware/efi ']' + mv -v /boot /boot.bak mv: cannot move '/boot' to '/boot.bak': Device or resource busy + cp -a /boot /boot.bak + rm -rf /boot/config-5.15.0-25-generic /boot/config-5.4.0-105-generic /boot/grub /boot/initrd.img /boot/initrd.img-5.15.0-25-generic /boot/initrd.img-5.4.0-105-generic /boot/initrd.img.old /boot/lost+found /boot/System.map-5.15.0-25-generic /boot/System.map-5.4.0-105-generic /boot/vmlinuz /boot/vmlinuz-5.15.0-25-generic /boot/vmlinuz-5.4.0-105-generic /boot/vmlinuz.old + umount /boot + isEFI + '[' -d /sys/firmware/efi ']' + /nix/var/nix/profiles/system/bin/switch-to-configuration boot Error: /run/current-system/sw/bin is missing Caused by: No such file or directory (os error 2)
It seems that NixOS new switch-to-configuration Rust tool expects /run/current-system/sw/bin to exist.
switch-to-configuration
/run/current-system/sw/bin
A dirty fix to circumvent this issue is to run ln -s /nix/var/nix/profiles/system /run/current-system then /nix/var/nix/profiles/system/bin/switch-to-configuration boot.
ln -s /nix/var/nix/profiles/system /run/current-system
/nix/var/nix/profiles/system/bin/switch-to-configuration boot
When running nixos-infect on a brand new Contabo VPS running Ubuntu 22.04, I get the following crash:
It seems that NixOS new
switch-to-configuration
Rust tool expects/run/current-system/sw/bin
to exist.