Comments (8)
I manage to get it working:
-First I just compiled a kernel with ms defaults
sudo make KCONFIG_CONFIG=Microsoft/config-wsl
-Copied
/usr/src/4.19.57-microsoft-standard/arch/x86/boot/compressed/vmlinux.bin
to
C:\Users\lbrav\kernel
-Added a .wslconfig file in C:\Users\lbrav\
with
[wsl2] #kernel=C:\\Users\\lbrav\\kernel\\vmlinux.bin
-Restart WSL
wsl --shutdown wsl -d Ubuntu
from usbip-wsl2-instructions.
Remove the # in front of kernel=C:\...\kernel\vmlinux.bin. The # comments out the line so it gets ignored. I did the same thing before realizing that.
My .wslconfig is:
[wsl2]
kernel=C:\\Users\\Luigi90900\\kernel\\vmlinux.bin
swap=0
from usbip-wsl2-instructions.
Hi psykhon,
I'm pretty sure it does but I haven't confirmed 100% that it's loading the new kernel. If you look carefully you'll notice that this method is simply modprobing in kernel modules that we've built, not building the drivers into the kernel.
One thing that had me stumped for a while is that WSL 2 seems to only run the exact named version as installed. If you acquired the source using git, if you make changes to files that are not ignored by git, the Linux build process will append a + to the name of the kernel to indicate that your build is dirty. For example you may see at the end of the Linux build:
DEPMOD 4.19.43-microsoft-standard+
To get around this you could do:
sudo make LOCALVERSION=
(note my previous edit of this comment is wrong)
I found this information on https://stackoverflow.com/questions/19333918/dont-add-to-linux-kernel-version
from usbip-wsl2-instructions.
By now I can confirm that make install does not loads the new kernel
https://github.com/MicrosoftDocs/WSL/releases/tag/18947
still havent had any success runing a new kernel in this way but I'll get back to you when I manage to do it
from usbip-wsl2-instructions.
Thank you @lisbravo! Installing the custom kernel by using the wsl2 config worked like a treat. Then I was able to install the kernel modules and finally run the startusb.sh
without seeing any errors!
from usbip-wsl2-instructions.
I tried to run the command for compiling a kernel with ms defaults
sudo make KCONFIG_CONFIG=Microsoft/config-wsl
it gives me this output:
***
*** Configuration file "Microsoft/config-wsl" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
scripts/kconfig/Makefile:69: recipe for target 'syncconfig' failed
make[2]: *** [syncconfig] Error 1
Makefile:534: recipe for target 'syncconfig' failed
make[1]: *** [syncconfig] Error 2
Makefile:633: recipe for target 'include/config/auto.conf.cmd' failed
make: *** [include/config/auto.conf.cmd] Error 2```
I have run the configurator so I am not sure what the next step in fixing this would be
from usbip-wsl2-instructions.
It's been a couple weeks since I did this, but I think I followed the instructions in the primary readme (take care to check out the correct branch, per issue number #3).
Specifically, these steps (again, use the actual version/git tag that matches your kernel at the moment, mine is 4.19.104-microsoft-standard
, git tag 4.19.104-microsoft-standard
/usr/src/4.19.104-microsoft-standard$ sudo cp /proc/config.gz config.gz
/usr/src/4.19.104-microsoft-standard$ sudo gunzip config.gz
/usr/src/4.19.104-microsoft-standard$ sudo mv config .config
/usr/src/4.19.104-microsoft-standard$ sudo make menuconfig
Instead of make KCONFIG_CONFIG=Microsoft/config-wsl
. In theory using the current config from proc/config.gz from within WSL should be the WSL defaults.
Anyway, the key was to copy the kernel out of WSL and then point WSL At it in .wslconf
per @lisbravo 's comment.
from usbip-wsl2-instructions.
Hi @theseankelly and @lisbravo I could not get it to work.
I already tried checkout v4.19.84
and it would show something @CalebGreer had posted being
*** Configuration file "Microsoft/config-wsl" not found!
When I checkout 4.19.84-microsoft-standard
it showed something like
user@DESKTOP-KDJ7PIR:/usr/src/4.19.84-microsoft-standard$ sudo git checkout 4.19.84-microsoft-standard
M Microsoft/config-wsl
HEAD is now at db998769a92e Merge tag 'v4.19.84' into linux-msft-wsl-4.19.y
user@DESKTOP-KDJ7PIR:/usr/src/4.19.84-microsoft-standard$
and sudo make KCONFIG_CONFIG=Microsoft/config-wsl
works
and show this at the end
DEPMOD 4.19.84-microsoft-standard+
sh ./arch/x86/boot/install.sh 4.19.84-microsoft-standard+ arch/x86/boot/bzImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.19.84-microsoft-standard+ /boot/vmlinuz-4.19.84-microsoft-standard+
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.19.84-microsoft-standard+ /boot/vmlinuz-4.19.84-microsoft-standard+
update-initramfs: Generating /boot/initrd.img-4.19.84-microsoft-standard+
W: mkconf: MD subsystem is not loaded, thus I cannot scan for arrays.
W: mdadm: failed to auto-generate temporary mdadm.conf file.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.19.84-microsoft-standard+ /boot/vmlinuz-4.19.84-microsoft-standard+
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.19.84-microsoft-standard+ /boot/vmlinuz-4.19.84-microsoft-standard+
but whenever I startusb.sh
modprobe: FATAL: Module usbip-core not found in directory /lib/modules/4.19.84-microsoft-standard
modprobe: FATAL: Module vhci-hcd not found in directory /lib/modules/4.19.84-microsoft-standard
I did @lisbravo
[wsl2] #kernel=C:\\Users\username\\kernel\\vmlinux.bin
%userprofile%\.wslconfig
and %userprofile%\kernel\vmlinux.bin
and shutdown and restart wsl as well but startusb.sh still shows something like that.
usbip is working good and I have set up everything on the windows side. just left with the compiling
from usbip-wsl2-instructions.
Related Issues (20)
- the instructions missed an important point to take in consideration to be able to reach the end
- Accessing new USB device HOT 4
- usbip: error: import device HOT 2
- Errors on Build USBIP tools step HOT 2
- Support for Host-side USB[M]
- USBIP
- make: *** [Makefile:498: install-recursive] Error 1 HOT 1
- Modprobe failure HOT 5
- Kernel Version Issue HOT 1
- WSL中设备绑定异常
- Problem with run usb network card on WSL2 machine
- modprobe: ERROR: could not insert 'usbcore': Exec format error
- Thanks - precompiled wsl ubuntu usb kernels now available HOT 6
- modprobe: FATAL: Module usbcore not found in directory /lib/modules/5.15.68.1-microsoft-standard-WSL2 HOT 1
- git checkout v.4.4.0 error HOT 3
- username and password required HOT 1
- modprobe: ERROR: could not insert '<module>': Invalid argument HOT 2
- usbip_device_driver.c:108:2: error: ‘strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation] HOT 2
- usbip Error (WSL 2) HOT 2
- usb modules not found in directory /lib/modules/4.19.84-microsoft-standard+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usbip-wsl2-instructions.