-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Optimized kernel config for better general kernel support and saner defaults #176
Optimized kernel config for better general kernel support and saner defaults #176
Conversation
Add the option from #163 to config to optimize security.
Hi! I compiled a linux kernel based on your fork: https://github.com/WSLUser/WSL2-Linux-Kernel/tree/WSLUser-5.8.5-config and your config: https://github.com/WSLUser/WSL2-Linux-Kernel/blob/WSLUser-5.8.5-config/Microsoft/config-wsl. but after I specified the path to the kernel in the .wslconfig file:
my wsl 2 (ubuntu-20.04) does not start — no errors are displayed, not even any command-line characters in the terminal, — just a perfectly empty terminal screen. I did the following steps to compile the kernel:
After running this command, a few messages were displayed saying that the file was overwritten, but at the end of the command, the message was displayed:
After that the compilation process started and was completed successfully:
The standard kernel 4.19.128 works well. My environment: windows (x64) 2004 |
I didn't update the kernel, just the config. Also you are supposed to cp the bzimage file and rename it how you like in the directory you copied to. https://wsl.dev/wsl2-kernel-zfs/ has instructions |
Have you tested these? I don't seem to be able to boot after compiling this. |
sigh. Follow directions I linked to. I use it just fine. I will soon update to the 5.8.14 release soon so for now you may have to answer some questions. I've also cut some stuff out to try and keep config_thermal from being re-enabled locally but haven't tested those changes yet. |
Adds xt_recent module, needed for iptables -m recent ..., used by Kubernetes kube-proxy to implement Services with sessionAffinity: ClientIP
Should https://gist.githubusercontent.com/kruxmeier/eb4becb7ba5c16192274f6fce3a47309/raw/1300aaa38916590455c87e663af9e2732f338090/fix%2520vmwp.bat be added in the Microsoft directory? Also, when compiling under Fedora33 I got a lot of thermal config questions. Nice if the README worked for both Debian and Fedora flavor distros. https://fedoramagazine.org/wsl-fedora-33/ At least on Fedora 33 to build perf, this patch is also needed: https://src.fedoraproject.org/rpms/kernel-tools/c/589a32b62f0c12516ab7b34e3dd30d450145bfa4?branch=master ./perf --version
perf version 5.4.20.g4acc5f40bad5 https://github.com/chadbrewbaker/ebpftalk/releases/tag/4acc5 if anybody wants to noodle on the binaries. git status
HEAD detached at 4acc5f40bad5
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: Microsoft/config-wsl
modified: tools/perf/Makefile.config
Untracked files:
(use "git add <file>..." to include in what will be committed)
Microsoft/config-wsl.old
kernel/config_data.h |
I actually compile under Clear Linux but it uses the same packages as Fedora. I haven't been able to eliminate the thermal config options yet. There is a dependency re-enabling it. I already have a 5.9 config but was hoping to update the PR after fixing it. I'll probably just push it up for now in a day or two. |
Likely going to need to close this PR to target the 5.10 branch. This config will now be workable just from cloning the repo if targeting the 5.10 branch (going to the Linux kernel website directly no longer needed). |
Superceded by #245 which also targets the 5.10 branch. |
This configuration was originally based on Clear Linux's kernel config options toned down for general kernel usage and enabled a number of scenarios some of which that are addressed in other simpler PRs. This should make it easier to troubleshoot the Hyper-V side for bringing support to some features. USBIP has been enabled as this is a known working scenario with use of extra software installed on both Windows and WSL2. Adds ExFAT, NTFS, and IPv6 support (still needs work on the VM side). This is part of the resolution to #114. attn: @craigloewen-msft and @sashalevin. Options not supported in 5.4 should be ignored during compilation.