-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Are there steps missing integrating usbip support in NixOS-WSL ? #111
Comments
yes, that will not work. Maybe https://nixos.wiki/wiki/Linux_kernel#Custom_configuration is a help but I am not sure if the kernel can be exported from NixOS and will work for Windows/WSL. |
With the new WSL version from Windows store, I'm able to use usbip with the default NixOS system (because as far as I understand, NixOS isn't providing the kernel, that's provided by Microsoft?) I do have to use
but this might be because of my unusual networking (to work around Windows having the WSL2 interface as public, and my work laptop having firewalled all public interfaces without me being able to make an exception, I have a wireguard tunnel between Windows and WSL2, which I can change the Windows net compartment on. So 10.0.0.1 is the Windows IP for me.) |
We are using the kernel from Microsoft and explicitly not building one ourselves. |
I have
|
I think from memory you might have to install WSL from the Microsoft store to get the most up to date version? It's complaining about the Microsoft kernel, not the NixOS kernel I believe |
I have the WSL from the store. I did some digging to see where the message is generated: https://github.com/dorssel/usbipd-win/blob/c86397770de86a1493e1ce1a7aef497e99ba8fc2/Usbipd/CommandHandlers.cs#L657. So the test it runs is here https://github.com/dorssel/usbipd-win/blob/c86397770de86a1493e1ce1a7aef497e99ba8fc2/Usbipd/CommandHandlers.cs#L647. When I tried to run this command from the admin powershell I got an error:
But it runs fine if I specify the full path to cat:
As a matter of fact only the commands under standard Linux paths (/bin, /usr/bin) work without specifying their paths with |
So after I symlinked cat and usbip to /usr/bin everything seems to be working:
But I am puzzled why busid is 1-1 in Linux:
Should those symlinks be part of the usbip install? |
I have the latest WSL version:
And I've installed the latest usbipd I've tried to attach a device from Windows using the following command:
And running usbip to attach from within WSL doesn't work either, because Which NixOS package am I supposed to install to get the usbip command? edit: here I found the answer. its |
You should now (on the latest commit on main at least) be able to use usbip, by setting |
Just setting sudo ln -s /run/current-system/sw/bin/cat /usr/bin
sudo ln -s /run/current-system/sw/bin/usbip /usr/bin |
Discussed in #110
Originally posted by 573 June 23, 2022
It would be awesome to have usbip support in NixOS-WSL (see https://github.com/dorssel/usbipd-win/wiki/WSL-support).
I've only gotten so far to try the usbip command inside the VM and I'm still not clear how to get that. Loading kernel package in configuration.nix didn't seem to as we use the kernel provided by Microsoft.
Is it just a case of building our own version of the MS kernel (https://nixos.wiki/wiki/Linux_kernel) ?
When from Powershell (regular user, Windows side) running
➜ & 'C:\Program Files\usbipd-win\usbipd.exe' wsl attach --busid 3-1
I'm just stuck in the
usbipd: error: WSL 'usbip' client not correctly installed. See https://github.com/dorssel/usbipd-win/wiki/WSL-support for the latest instructions.
What do you say ? Can we figure this out as a Step-By-Step list maybe just to complete the instructions (saying just "on other distros") over at https://github.com/dorssel/usbipd-win/wiki/WSL-support ?
The text was updated successfully, but these errors were encountered: