title: no build/script directory in lib/modules for a WSl2 kernel
body: <p>I built and configured a kernel in WSL2 (wsl-5.4.91, gcc 9.4.0, Ubuntu 18.04 WSL)</p>
  <p>While installing <strong>MLNX_OFED</strong> I get the error that there are no files in the <strong>lib/modules//build/scripts.</strong></p>
  <p><strong>I there an easy way to copy the scripts in there?</strong></p>
  <p>I read this but didn't get far: <a href="https://unix.stackexchange.com/questions/594470/wsl-2-does-not-have-lib-modules">https://unix.stackexchange.com/questions/594470/wsl-2-does-not-have-lib-modules</a></p>
  <hr />
  <p>Here is how I got there:</p>
  <blockquote>
  <p>home/thilo/MLNX_OFED_LINUX-5.4-1.0.3.0-ubuntu18.04-x86_64# .<strong>/mlnxofedinstall --add-kernel-support</strong></p>
  </blockquote>
  <p>but I got the following error:</p>
  <blockquote>
  <p>ERROR: Failed executing &quot;MLNX_OFED_SRC-5.4-1.0.3.0/install.pl --tmpdir
  /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new-WSL2+/mlnx_iso.127_logs
  --kernel-only --kernel 5.4.91-MS-new-WSL2+ --kernel-sources /lib/modules/5.4.91-MS-new-WSL2+/build --builddir
  /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new-WSL2+/mlnx_iso.127
  --without-dkms --without-debug-symbols --build-only --distro ubuntu18.04&quot; <strong>ERROR: See
  /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new-WSL2+/mlnx_iso.127_logs/mlnx_ofed_iso.127.log
  Failed to build MLNX_OFED_LINUX for 5.4.91-MS-new-WSL2+</strong></p>
  </blockquote>
  <p>Opening the <strong>mlnx_ofed_iso.127</strong> file to see for the error</p>
  <blockquote>
  <p>Logs dir:
  /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new-WSL2+/mlnx_iso.127_logs/OFED.326.logs</p>
  <p>General log file:
  /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-5.4.91-MS-new WSL2+/mlnx_iso.127_logs/OFED.326.logs/general.log [32m</p>
  <p>Below is the list of OFED packages that you have chosen</p>
  <p>(some may have been added by the installer due to package dependencies):
  [0m
  ofed-scripts mlnx-tools mlnx-ofed-kernel-utils
  mlnx-ofed-kernel-modules iser-modules isert-modules srp-modules
  mlnx-nvme-modules kernel-mft-modules knem-modules</p>
  <p>Checking SW Requirements...</p>
  <p>[31mOne or more required packages for
  installing OFED-internal are missing.[0m</p>
  <p><strong>[31m/lib/modules/5.4.91-MS-new-WSL2+/build/scripts is required for
  the Installation.[0m</strong></p>
  <p>[31mAttempting to install the following missing
  packages: python3-distutils dh-python make dh-autoreconf chrpath
  linux-headers-5.4.91-MS-new-WSL2+ dpatch swig build-essential bzip2
  debhelper graphviz quilt python3 pkg-config gcc[0m</p>
  <p>[31mFailed
  command: apt-get install -y python3-distutils dh-python make
  dh-autoreconf chrpath linux-headers-5.4.91-MS-new-WSL2+ dpatch swig
  build-essential bzip2 debhelper graphviz quilt python3 pkg-config
  gcc[0m</p>
  </blockquote>