Skip to content

Nevuly/WSL2-Linux-Kernel-Rolling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rolling Release Stable Kernel for WSL2

Stable Kernel CI Release

Maintainer: Yang Jeong Hun (Nevuly)

Current Kernel Status

Kernel Version Status
Linux 6.12.x Stable Support

Introduction

The WSL2-Linux-Kernel-Rolling repo contains the latest stable kernel source code and configuration files for the WSL2.

This kernel is automatically built via Github Actions CI whenever a newer stable kernel is released.

Install Instructions

Kernel Image

Manual Installation

  1. Download kernel image from releases page.
  2. Place it to somewhere appropriate. (e.g. D:\WSL2\Kernel\bzImage-x86_64)
  3. Save the .wslconfig in current user's home directory with following content:
[wsl2]
kernel=the\\path\\to\\bzImage
; e.g.
; kernel=D:\\WSL2\\Kernel\\bzImage-x86_64
;
; Note that all `\` should be escaped with `\\`.
  1. Reboot your WSL2 and check kernel version using uname -a in WSL2 terminal.

Install via Scoop

NOTICE

  • You have to reboot your WSL2 system using wsl --shutdown after install or update kernel with using scoop.

Scoop is a command-line installer on windows. If you have scoop installed, then you can install this kernel with following commands:

scoop bucket add frostbite https://github.com/Nevuly/frostbite

scoop install frostbite/wsl2-rolling-kernel-stable

Scoop will automatically set kernel in .wslconfig.

Update Kernel Image

  • If you installed kernel via scoop, you can use scoop update * in Powershell.
  • If you installed kernel manually, download kernel image from releases page, and replace it.

Kernel Modules and Headers

NOTICE

  • This guide must be proceed in your WSL2 system.
  • Kernel modules and kernel headers install are optional. If you don't need modules and headers, just skip this guide.

Kernel Modules

# Please change latest version of kernel and select your architecture
wget https://github.com/Nevuly/WSL2-Linux-Kernel-Rolling/releases/download/linux-wsl-stable-**x.x.x**/bzImage-**arch**-modules_install.tar.gz

tar -xzvf bzImage-**arch**-modules_install.tar.gz

cd bzImage-**arch**-modules_install

sudo ./modules-install.sh

After execute installation script, please reboot your WSL2 system to load kernel modules correctly.

Kernel Headers and Documents

NOTICE

  • Before install kernel headers and documents, you must install kernel modules first!
# Please change latest version of kernel and select your architecture
wget https://github.com/Nevuly/WSL2-Linux-Kernel-Rolling/releases/download/linux-wsl-stable-**x.x.x**/bzImage-**arch**-optional_install.tar.gz

tar -xzvf bzImage-**arch**-optional_install.tar.gz

cd bzImage-**arch**-optional_install

sudo ./optionals-install.sh

After execute installation script, please reboot your WSL2 system to load kernel headers and documents correctly.

Reporting Bugs

If you discover an issue relating to WSL or the WSL2 kernel, please report it on the Issues tab.

Feature Requests

If you want to fix a bug or add new features, Please use the Pull Request.

Build Instructions

Instructions for building WSL2 kernel with an Arch Linux distribution are as follows:

  1. Install the build dependencies (Arch Linux):
    $ sudo pacman -S aarch64-linux-gnu-gcc bc bison curl flex gcc git pahole python unzip wget zip

  2. Build the kernel using the WSL2 kernel configuration (x86):
    $ make KCONFIG_CONFIG=arch/x86/configs/config-wsl-x86

  3. Build the kernel using the WSL2 kernel configuration (arm64):
    $ export ARCH=arm64 && export CROSS_COMPILE=aarch64-linux-gnu-
    $ make KCONFIG_CONFIG=arch/arm64/configs/config-wsl-arm64

  4. Save the module to a separate folder (Optional. Only for local build):
    $ sudo make modules_install

Credits

  • The Linux community who created a awesome kernel.
  • Microsoft which produced WSL2 and dxgkrnl patches.