Skip to content

Installing the Kuznyechik kernel module on Windows Subsystem for Linux version 2 (WSL2)

Matt Smith edited this page Jun 14, 2019 · 2 revisions

...Beta...

MKDecrypt still doesn't work under MS Windows even with WSL2 but below is a guide to installing the kuznyechik kernel module anyway.

...Beta...

You will need to be running Windows 10 Insider build 18917 or later.

You will need to enable WSL (Windows Subsystem for Linux). Instructions here

You will need to install the Debian GNU/Linux from the Microsoft store.

You will need to then enable WSL2. Instructions here

Now run the Debian Gnu/Linux app from the start menu.

Use the following command:

sudo nano /etc/apt/sources.list

Replace the file contents with the following:

deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free
#deb http://deb.debian.org/debian stretch-backports main contrib non-free
#deb-src http://deb.debian.org/debian stretch-backports main contrib non-free

Use Control-X to exit and follow the on screen prompts to save the changes.

Then use these commands:

sudo apt update
sudo apt full-upgrade
sudo apt install dkms git build-essential unzip libncurses5-dev
sudo apt -t stretch-backports install linux-headers-4.19.0-0.bpo.5-amd64 linux-compiler-gcc-6-x86
sudo apt -t stretch-backports build-dep linux
wget https://thirdpartysource.microsoft.com/download/Windows%20Subsystem%20for%20Linux%20v2/May%202019/WSLv2-Linux-Kernel-master.zip
sudo unzip WSLv2-Linux-Kernel-master.zip -d /usr/src
cd /usr/src/WSLv2-Linux-Kernel-master
sudo make menuconfig

Just save then exit.

Then follow these commands:

sudo mkdir -p /lib/modules/4.19.43-microsoft-standard/build/
sudo cp -r arch/ /lib/modules/4.19.43-microsoft-standard/build/
sudo cp -r include/ /lib/modules/4.19.43-microsoft-standard/build/
sudo cp -r /usr/lib/linux-kbuild-4.19/scripts/ /lib/modules/4.19.43-microsoft-standard/build/
sudo cp /lib/modules/4.9.0-9-amd64/build/Makefile /lib/modules/4.19.43-microsoft-standard/build/
sudo cp /lib/modules/4.9.0-9-amd64/build/Module.symvers /lib/modules/4.19.43-microsoft-standard/build/
cd
git clone https://github.com/kuzcrypt/kuznyechik-kernel.git
cd kuznyechik-kernel
nano Makefile

Change the lines:

dkms build -m kuznyechik-kernel -v $(version)
dkms install -m kuznyechik-kernel -v $(version)

to:

dkms build -m kuznyechik-kernel -v $(version) --kernelsourcedir /usr/src/WSLv2-Linux-Kernel-master
dkms install -m kuznyechik-kernel -v $(version) --kernelsourcedir /usr/src/WSLv2-Linux-Kernel-master

Use Control-X to exit and follow the on screen prompts to save the changes.

Then use the command:

sudo make install
cd ..
rm -rf kuznyechik-kernel WSLv2-Linux-Kernel-master.zip