-
Notifications
You must be signed in to change notification settings - Fork 856
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
Instruction for Using Kernel Modules/Headers Distributed as VHD in WSL2 #12586
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging |
/question |
Diagnostic information
|
I don't really know this is the right way to do, but...
Disclaimer
|
Yeh, this works. We can also add script containing Maybe something like this👇 [Unit]
Description=Create kernel modules symlink
After=local-fs.target
RequiresMountsFor=/mnt/wsl/kernel-modules
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'rm -rf /lib/modules/* && ln -sfn /mnt/wsl/kernel-modules/lib/modules/$(uname -r) /lib/modules/$(uname -r)'
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target I just wonder if there's any option in |
I also think there's a new setting coming soon. In the meantime, I went a slightly different route from:
This solution, like the others, requires that we always mount the disk first, and if we don't repeat the mountpoint + FSTAB steps, we'll need to always start "modules distro" first, and load there the needed modules too. I would say quite cumbersome. So repeating mountpoint + FSTAB steps is recommended if you have multiple distros. Hope this brings some light on the current workaround and I truly think/hope there's some PS: there's an intrusive way of modifying the kernel and loading the modules "like native", however is not documented nor encouraged ... but possible ;) The Corsair |
On Kernel v5 ( mount | grep modules
|
@affirm-bats-yodel the actual modules are in the |
I noticed that the WSL2 kernel team decided to distributes kernel modules as VHD/VHDX files in the latest 6.6.y kernel releases, along with instructions for building
modules.vhdx
. I am maintaining a rolling wsl2 kernel project and would like to know:modules.vhdx
(e.g., via a configuration toggle in the.wslconfig
file?).Use Case Context
I currently use Scoop to distribute my kernel releases. Distributing both kernel modules and headers as VHD/VHDX files would make it much easier to integrate headers & modules into scoop update utility. So users don't have to manually update headers and modules per distro per update.
Thanks for your insights!
The text was updated successfully, but these errors were encountered: