The WSL2-Linux-Kernel repo contains the kernel gore source code and configuration files for the WSL2 kernel.
no.
Instructions for building an x86_64 WSL2 kernel with an Ubuntu distribution are as follows:
- Install the build dependencies:
$ sudo apt install build-essential flex bison dwarves libssl-dev libelf-dev bc libncurses-dev
- Build the kernel using the WSL2 kernel configuration:
$ make KCONFIG_CONFIG=Microsoft/config-wsl
Instol wsl2 update
Shutdown wsl
wsl --shutdown
Push arch/x86/boot/bzImage to C:\Windows\System32\lxss\tools with file name kernel
copy arch/x86/boot/bzImage anywhere you want (except wsl) and create a .wslconfig in %UserProfile% (Windows user home folder) and put it into a file
[wsl2]
kernel=C:\\path\\to\\kernel
the path should be spelled with \\
Run your favorite gore wsl distro