Open aikooo7 opened 3 months ago
It looks like systemd hasn't started properly. That should obviously not crash the shell though, I'll fix that
As for the underlying problem: Can you send me the output of dmesg
executed in another distro right after this happens. To reduce the size of the output, it probably makes sense to shut down WSL with wsl --shutdown
before that
Is this the same error?
C:\Users\Admin>wsl
when trying to exec the wrapped shell
Caused by:
No such file or directory (os error 2)
There is a workaround: first fire up WSL with a recovery shell wsl -d NixOS --system --user root -- /mnt/wslg/distro/bin/nixos-wsl-recovery
and then enter WSL as usual
@polybluez no, that is a diffferent error. I suspect that the one @aikooo7 experienced was a race condition, because the shell wrapper tried to connect to journald before that was started. That one should be fixed now, because it does not result in a crash anymore. Your error looks like the wrapper tries to start your shell, but the shell's binary just does not exist for some reason. The same probably would have happened without the wrapper
This occurs for me as well, I basically have to revert to wsl.nativeSystemd = false;
, or I cannot use NixOS-WSL at all.
Data point: My NixOS-WSL is built using a flake, using a user created by the flake (and not the nixos
user). As soon as I have run the flake built, it is broken. Tried with a completely fresh install of the latest build (which has https://github.com/nix-community/NixOS-WSL/pull/496 merged), followed by my flake build.
After the flake build, I cannot start up the distribution due to this error.
Bug description
When enabling native systemd support and rebuild, switch and restart system you will be unable to log in to your system unless you use the recovery shell or use the shell binary directly instead of the wrapper.
Note: While trying to find what was the cause of the issue I rebuilt my home-manager and got
Failed to connect to bus: No such file or directory
so maybe #375 is related.To Reproduce
Steps to reproduce the behavior: Add
wsl.nativeSystemd = true;
Runsudo nixos-rebuild switch
Runwsl --shutdown
in cmd. Runwsl -d NixOS
in cmd. NixOS should be your nixos distro's name in wsl.Logs
WSL version
2.0.9.0