-
-
Couldn't load subscription status.
- Fork 152
Load kernel modules #524
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
base: main
Are you sure you want to change the base?
Load kernel modules #524
Conversation
WSL now supports kernel modules and come with a bunch configured as `m` and can be loaded this way. For example `vhci-hcd` used by usbip has changed from `y` to `m` and hence need to be explicitly loaded.
02b50d1 to
94010f2
Compare
| The set of kernel modules to be loaded in the second stage of | ||
| the boot process via systemd-modules-load.service. | ||
| ''; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we reuse boot.kernelModules here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it is gated behind boot.kernel.enable which we don't want to enable.
Another option is to have something like a boolean wsl.loadKernelModules. That will write the file with the value based on boot.kernelModules. What do you prefer?
|
Wait, how does this even work. Isn't our modprobe looking in the wrong path for this? |
|
Just wanted to ask this, because if I run |
|
You want |
|
Systemd will do the loading based on config files located in this directory https://www.freedesktop.org/software/systemd/man/latest/modules-load.d.html For NixOS it works like this: |
|
But how does it know where to find the WSL modules |
|
It is bundled with the kernel as loadable modules as I understand it and this change happened in the latest WSL kernel release (6.6). See release notes |
It seems that modprobe does not report if it failed though. It'll just run through but then |
|
WSL also rolled back to 5.15 for now. I really want to see a test at this point to actually verify it does what it says. |
|
Ah, i have 5.15, that might be why this doesn't work |
|
Yes, that is a bit confusing, just discovered they reverted to the older kernel again now when I was looking into it. I have tested this on WSL with the 6.6 kernel and verified it works. But I guess we might as well wait looking into it since the latest WSL went back to the older kernel. |
|
WSL 2.5.7 switched to the 6.6 kernel, can this PR get merged now? |
0fa96ff to
d34d941
Compare
cc18cce to
fd04040
Compare
WSL now supports kernel modules and come with a bunch configured as
mand can be loaded this way. For examplevhci-hcdused by usbip has changed fromytomand hence need to be explicitly loaded.dorssel/usbipd-win#995
microsoft/WSL#11789 (comment)
Unfortunately we cannot use
boot.kernelModulessince it is gated behindboot.kernel.enable.