From 5c6d30241230374d2778fc5180f75e7fd10d7739 Mon Sep 17 00:00:00 2001 From: Antonio Castaldo D'Ursi Date: Sat, 7 Jan 2023 20:43:52 +0100 Subject: [PATCH 1/2] Added missing commands / config added ubuntu package install added modules / install added [wsl2]section --- vcan-in-wsl2/vcan-in-wsl2.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vcan-in-wsl2/vcan-in-wsl2.sh b/vcan-in-wsl2/vcan-in-wsl2.sh index 34a8d45..c40ffd6 100644 --- a/vcan-in-wsl2/vcan-in-wsl2.sh +++ b/vcan-in-wsl2/vcan-in-wsl2.sh @@ -1,6 +1,9 @@ +# update +sudo apt-get update + # required packages sudo apt install -y libelf-dev dwarves flex bison libssl-dev \ - libncurses-dev + libncurses-dev bc make build-essential # The below few connamds will checkout the 1GB default kernel git clone https://github.com/microsoft/WSL2-Linux-Kernel @@ -20,11 +23,16 @@ make menuconfig #build the kernel make -j4 +#make modules and install them +make modules +make modules_install + # We'll need to store our custom kernel in the Windows environment and # launch it when we start wsl2. # Change the path below to where you want to store it cp vmlinux /mnt/c/Users// cat >> /mnt/c/Users//.wslconfig << "ENDL" +[wsl2] kernel=C:\\Users\\\\vmlinux ENDL From 993a99d860654c42b2eedfccb80d01047879e108 Mon Sep 17 00:00:00 2001 From: Antonio Castaldo D'Ursi Date: Sat, 7 Jan 2023 21:42:37 +0100 Subject: [PATCH 2/2] Added sudo command --- vcan-in-wsl2/vcan-in-wsl2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcan-in-wsl2/vcan-in-wsl2.sh b/vcan-in-wsl2/vcan-in-wsl2.sh index c40ffd6..aa85c92 100644 --- a/vcan-in-wsl2/vcan-in-wsl2.sh +++ b/vcan-in-wsl2/vcan-in-wsl2.sh @@ -25,7 +25,7 @@ make -j4 #make modules and install them make modules -make modules_install +sudo make modules_install # We'll need to store our custom kernel in the Windows environment and # launch it when we start wsl2.