Skip to content
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

[WSL 2]Replace/update kernel? #4228

Closed
pascua28 opened this issue Jun 25, 2019 · 2 comments
Closed

[WSL 2]Replace/update kernel? #4228

pascua28 opened this issue Jun 25, 2019 · 2 comments

Comments

@pascua28
Copy link

pascua28 commented Jun 25, 2019

Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.

If you have a feature request, please post to the UserVoice.

If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.

Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to secure@microsoft.com. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".

Please fill out the below information:

  • Your Windows build number: Microsoft Windows [Version 10.0.18922.1000]

  • What you're doing and what's happening: I've successfully compiled the kernel from here: https://thirdpartysource.microsoft.com/download/Windows%20Subsystem%20for%20Linux%20v2/May%202019/WSLv2-Linux-Kernel-master.zip using the default config from /proc/config.gz. I used make -j4 and then sudo make install. I checked the corresponding files in /boot to ensure everything is updated.

  • What's wrong / what should be happening instead: After issuing the above commands and shutting down the vm using wsl --shutdown Debian, uname -a still returns Linux Sam 4.19.43-microsoft-standard #1 SMP Mon May 20 19:35:22 UTC 2019 x86_64 GNU/Linux which means the kernel didn't get updated. I even did make -j4 bindeb-pkg to make debian packages, and after installing, still the same.

  • For WSL launch issues, please collect detailed logs.

See our contributing instructions for assistance.

@kdrag0n
Copy link

kdrag0n commented Jun 25, 2019

The WSL 2 kernel is not actually inside any of the distro containers. Instead, it's located at C:\Windows\System32\lxss\tools\kernel in Windows and owned by TrustedInstaller, which means that you will need to take ownership of the file and grant yourself the permissions necessary to modify it first.

Since this process can be daunting, I wrote a comprehensive guide for replacing the kernel, as well as some helper scripts to do the work for you: https://github.com/kdrag0n/proton_wsl2/blob/v4.19-proton/README.md#installation

@pascua28
Copy link
Author

The WSL 2 kernel is not actually inside any of the distro containers. Instead, it's located at C:\Windows\System32\lxss\tools\kernel in Windows and owned by TrustedInstaller, which means that you will need to take ownership of the file and grant yourself the permissions necessary to modify it first.

Since this process can be daunting, I wrote a comprehensive guide for replacing the kernel, as well as some helper scripts to do the work for you: https://github.com/kdrag0n/proton_wsl2/blob/v4.19-proton/README.md#installation

Thanks for the guide. Okay, so I just realized that the kernel must be loaded first in order to mount the ext4 partition (which the /boot partition also resides). Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants