nix-community / NixOS-WSL

NixOS on WSL(2) [maintainer=@nzbr]
Apache License 2.0
1.6k stars 108 forks source link

Activation script snippet 'createBootedSystemSymlink' failed #513

Closed Prince213 closed 1 week ago

Prince213 commented 2 weeks ago

Bug description

When building tarball a error occurred.

setting up /run/booted-system...
ln: failed to create symbolic link '/run/booted-system': No such file or directory
Activation script snippet 'createBootedSystemSymlink' failed (1)

Related: https://github.com/nix-community/NixOS-WSL/pull/325.

To Reproduce

Steps to reproduce the behavior:

Get https://github.com/nix-community/NixOS-WSL/releases/download/2405.5.4/nixos-wsl.tar.gz, then

> wsl --import nixos-wsl "$env:USERPROFILE\nixos-wsl" nixos-wsl.tar.gz
> wsl -d nixos-wsl
$ sudo nix-channel --update
$ sudo nixos-rebuild switch
> wsl -t nixos-wsl
> wsl -d nixos-wsl
$ nix shell --extra-experimental-features "nix-command flakes" github:NixOS/nixpkgs/nixos-unstable#git
$ sudo nix run --extra-experimental-features "nix-command flakes" github:nix-community/NixOS-WSL#nixosConfigurations.default.config.system.build.tarballBuilder

Logs

$ sudo nix run --extra-experimental-features "nix-command flakes" github:nix-community/NixOS-WSL#nixosConfigurations.default.config.system.build.tarballBuilder
[NixOS-WSL] Installing...
copying channel...
these 521 paths will be fetched (0.00 MiB download, 1531.58 MiB unpacked):
  /nix/store/zigblcx2ags6hnsjfcacr7z32xq8xxgm-0z4i8wyg3ymm7kkb1gk2wyh08x230c6z-source
  ...
  /nix/store/xhmpzv6qnamn1wwwrwzws6w9wpazs4yw-zstd-1.5.6-man
copying path '/nix/store/9dij3pl4dkdxmxhasjw1pa9hzqv4rjlp-glibc-locales-2.39-52' to 'local'...
...
copying path '/nix/store/hs4n4dv9jy42h900nr301pczixxl6fmz-nixos-system-nixos-24.05.20240702.706eef5' to 'local'...
installing the boot loader...
setting up /run/booted-system...
ln: failed to create symbolic link '/run/booted-system': No such file or directory
Activation script snippet 'createBootedSystemSymlink' failed (1)
setting up /etc...
setting up /bin...
setting up /bin/login...
setting up /sbin/init shim...
installation finished!
[NixOS-WSL] Adding channel...
setting up /run/booted-system...
setting up /etc...
setting up /bin...
setting up /bin/login...
setting up /sbin/init shim...
[NixOS-WSL] Adding default config...
[NixOS-WSL] Compressing...

WSL version

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.3737
SuperSandro2000 commented 2 weeks ago

514