-
-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NixOS requires other distro to attach #973
Comments
Steps using Troubleshooting so far
|
I'm sure your kernel is WSL capable. It's just the test for it that fails due to an uncommon distro. To solve it, you could simply install another distro (e.g. Ubuntu) and use that to attach. The device will be available in every distro. However, I would like to find out why the test fails on your distro. This is the command that fails:
What is the output if you run that in a (Windows) command prompt? |
@dorssel
You're right the problem might be
|
Does the following work?
and/or this one?
|
To further this as I am using NixOS as well and having the same problem, here is the results of each command.
|
If NixOS cannot even run Linux Standard Base Core applications, then it is not going to be supported. Use another distro to attach. |
As this seems to be a issue with how NixOS uses packages I normally get around it by using paths like I agree on not going out of your way to support this, in fact I'm more of a scripter than programmer so I couldn't way in on the complexity of supporting NixOS but don't waste your time. I'm sure that theirs probably a NixOS option that can be used to allow support and as long as the standard distro support works there may be a NixOS specific option we can enable when using usbipd like we do with vscode. |
One option would be (if NixOS somehow is capable) to ensure the required commands are in the default path; on regular OSs this is in
Wikipedia explicitly says:
But like I said, the easiest is probably to just install Ubuntu as well, and use that for attaching. The device should then be available in NixOS as well. |
I believe this issue is related to nix-community/NixOS-WSL#284 (comment) For me the line that fails is in
I've confirmed this produces an error when executed in PS.
Booting up another distro and attaching through that works, however I'm not super thrilled about having a random ubuntu stub in my configurations, and it's also tedious to boot the stub every time I need to reattach a device. is there any chance we could use a login shell to read the kernel version, or perhaps fallback to one if a non-login shell fails? I'd be interested in fiddling around with this a bit more in a fork, but I haven't been able to find any build instructions. |
@saippua Does the following work?
and this one?
If we are going the "fallback" route (I like the idea), then we might as well go all the way:
And this for all the commands, of course. |
Neither of these work (the error is
does work (added |
From https://pubs.opengroup.org/onlinepubs/9799919799/utilities/sh.html, the
|
Sorry to bother
|
admin powershell:
non-admin powershell:
Using custom kernel https://github.com/LGUG2Z/custom-wsl2-linux-kernel doesn't change anything.
The text was updated successfully, but these errors were encountered: