!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

347 Members
https://github.com/nix-community/NixOS-WSL61 Servers

Load older messages


SenderMessageTime
17 Apr 2023
@k900:0upti.meK900The easiest way I can think of to unscrew this would probably be to install from the latest installer12:41:28
@k900:0upti.meK900
In reply to@nzbr:nzbr.de
Not dying when the activation script fails would be a good first step
The native systemd wrapper tries to
12:41:36
@nzbr:nzbr.deArson Copperflame
In reply to @nehu:matrix.org

Sorry for the late answer. No, I can't get a shell...
The command you provided silently fails.
If I try to enter "normally", I end up with the following:

wsl -d nixos-testing
Copying /usr/share/applications
Copying /usr/share/icons
rsync: [sender] change_dir "/nix/store/i2cy643r2znpj8bji5f67z3nyb8mwws9-nixos-system-nixos-22.11.3667.87edbd74246/sw/share/icons" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1327) [sender=3.2.6]
Activation script snippet 'copy-launchers' failed (23)
setting up /etc...
setting up /bin...
Can you get a shell with just wsl -d NixOS -e /bin/sh?
12:42:35
@k900:0upti.meK900Or just get the latest installer from here: https://github.com/nix-community/NixOS-WSL/actions/runs/470907988612:43:19
@nehu:matrix.orgNehu
In reply to @nzbr:nzbr.de
Can you get a shell with just wsl -d NixOS -e /bin/sh?
Silently fails :(
12:43:23
@nehu:matrix.orgNehu
In reply to @nzbr:nzbr.de
Can you get a shell with just wsl -d NixOS -e /bin/sh?
* Silently fails (with exit code 1) :(
12:43:52
@nzbr:nzbr.deArson Copperflame Okay, that doesn't sound right at all...
What about wsl -d NixOS --system?
12:44:11
@nehu:matrix.orgNehu
In reply to @nzbr:nzbr.de
Okay, that doesn't sound right at all...
What about wsl -d NixOS --system?
Complains about "--system" not being a valid WSL option and returns exit code 127
12:46:06
@k900:0upti.meK900Which WSL version are you on?12:46:20
@nehu:matrix.orgNehuHmm, how do I check that again? I can tell the windows version is 19043.164512:47:10
@k900:0upti.meK900Oh no12:47:29
@k900:0upti.meK900Why are you on EOL Windows?12:47:46
@nehu:matrix.orgNehuHmm... ask my company's IT department xD12:48:11
@nehu:matrix.orgNehuI can try updating windows that said12:48:26
@k900:0upti.meK900You definitely should12:48:43
@nehu:matrix.orgNehuBut afaik they tend to block certain updates for a while12:48:48
@k900:0upti.meK900At the very least, your version is no longer getting security updates12:48:52
@k900:0upti.meK90019045 is the current build12:48:59
@nehu:matrix.orgNehuOh I see... damn, good to know12:49:15
@nehu:matrix.orgNehu

OK so a few very long reboots later, I ended up at windows version 19043.2364 and I can use wsl --system
Now, when I run wsl -d NixOS -e /bin/sh as suggested by nzbr (they/it) , I do get a bit more:

wsl -d nixos-testing -e /bin/sh
<3>WSL (8) ERROR: CreateProcessEntryCommon:577: execvpe C:/Users/me/scoop/apps/msys2/2021-04-19/usr/bin/sh failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:586: Create process not expected to return

So it seems like it tries to execute something that isn't part of the WSL environment (in this case, the MSys2 version of /sur/bin/sh, which is a windows executable...

14:02:23
@k900:0upti.meK900That is definitely not normal 14:13:55
@k900:0upti.meK900And your Windows is still on an old build 14:14:01
@k900:0upti.meK900Just a slightly less old one 14:14:08
18 Apr 2023
@sandro:supersandro.deSandro 🐧

WSL does not startup for me correctly when on https://github.com/nix-community/NixOS-WSL/commit/f3b6f6b04728416c64fc5ef52199fd9b9843c47d

[Tue Apr 18 17:15:45 2023] systemd_shim[1]: /dev/shm is not a symlink, leaving as-is...
[Tue Apr 18 17:15:45 2023] systemd_shim[1]: Remounting / shared...
[Tue Apr 18 17:15:45 2023] systemd_shim[1]: Remounting /nix/store read-only...
[Tue Apr 18 17:15:45 2023] systemd_shim[1]: Running activation script...
[Tue Apr 18 17:15:45 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:45 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:45 2023] setting up /usr/share/applications...
[Tue Apr 18 17:15:45 2023] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[Tue Apr 18 17:15:45 2023] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[Tue Apr 18 17:15:45 2023] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[Tue Apr 18 17:15:45 2023] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[Tue Apr 18 17:15:45 2023] setting up /usr/share/icons...
[Tue Apr 18 17:15:45 2023] Deleting all channels...
[Tue Apr 18 17:15:45 2023] Deleting all user profiles...
[Tue Apr 18 17:15:45 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:45 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:45 2023] Can't ignore signal CHLD, forcing to default.
[Tue Apr 18 17:15:45 2023] setting up /etc...
[Tue Apr 18 17:15:46 2023] setting up secrets...
[Tue Apr 18 17:15:46 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:46 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:46 2023] setting up /sbin/init shim...
[Tue Apr 18 17:15:46 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:46 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:46 2023] systemd_shim[1]: Spawning real systemd...
[Tue Apr 18 17:15:46 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:46 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:46 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:46 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:46 2023] systemd-journald[205]: Collecting audit messages is disabled.
[Tue Apr 18 17:15:46 2023] systemd-journald[205]: Received client request to flush runtime journal.
[Tue Apr 18 17:15:47 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:47 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:47 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:47 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:47 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:47 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:47 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:47 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:48 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:48 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:48 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:48 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:48 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:48 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:48 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:48 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:49 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:49 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:49 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:49 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:49 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:49 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:49 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:49 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:50 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:50 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:50 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:50 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:50 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:50 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:50 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:50 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:51 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:51 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:51 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:51 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:51 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:51 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:51 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:51 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:52 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:52 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:52 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:52 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:52 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:52 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:52 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:52 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:53 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:53 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:53 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:53 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:53 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:53 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:53 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:53 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:54 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:54 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:54 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:54 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:54 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:54 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:54 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:54 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:55 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:55 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:55 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:55 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:55 2023] sh: line 1: systemctl: command not found
[Tue Apr 18 17:15:55 2023] sh: line 1: grep: command not found
[Tue Apr 18 17:15:55 2023] WSL (2) ERROR: WaitForBootProcess:3184: /sbin/init failed to start within 10000
[Tue Apr 18 17:15:55 2023] ms
[Tue Apr 18 17:15:55 2023] WSL (2) WARNING: /etc/resolv.conf updating disabled in /etc/wsl.conf
[Tue Apr 18 17:15:55 2023] WSL (2): Creating login session for sandro
[Tue Apr 18 17:16:32 2023] hv_balloon: Max. dynamic memory size: 6144 MB
15:20:00
@sandro:supersandro.deSandro 🐧
wsl --version
WSL version: 1.2.0.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1413
15:24:39
@k900:0upti.meK900I have a suspicion15:28:41
@k900:0upti.meK900We don't root /bin/sh, do we15:28:57
@sandro:supersandro.deSandro 🐧I am not sure tbh15:32:07
@sandro:supersandro.deSandro 🐧
 ▶ ls -lah /bin/sh
lrwxrwxrwx root root 75 B Tue Apr 18 17:27:55 2023  /bin/sh ⇒ /nix/store/pk3kkaafln68gzxawk57qp9m5h5285va-bash-interactive-5.2-p15/bin/sh
15:33:07
@sandro:supersandro.deSandro 🐧also I am not sure why I am on 1.2.0.0, I didn't manually update to that and I didn't find a way to downgrade15:34:13

Show newer messages


Back to Room ListRoom Version: 9