nathanchance / WSL2-Linux-Kernel

linux-next-based WSL2 kernel (discontinued due to no longer using WSL2)
Other
151 stars 16 forks source link

Issues with mounting drives #2

Closed nathanchance closed 4 years ago

nathanchance commented 4 years ago

Spun off from #1.

@koumaza @Justsnoopy30 are you guys doing anything with /etc/wsl.conf?

As just a starting point to debugging, could you please try this kernel?

  1. Extract the zip.

  2. Update your .wslconfig to point to that kernel.

  3. Run wsl --shutdown then reopen your browser.

  4. If it works, just let me know and I'll do another kernel. If not, run dmesg > dmesg.log then upload that dmesg.log here.

Justsnoopy30 commented 4 years ago

https://github.com/microsoft/vscode-remote-release not opensource...?

Apparently not. Also has 794 open issues.

koumaza commented 4 years ago

Ah. found https://github.com/Microsoft/vscode-dev-containers

koumaza commented 4 years ago

I also built it. Use arch/x86/configs/x86_64_defconfig linux-msft-5.4.y bzImage.txt

Justsnoopy30 commented 4 years ago

I also built it. Use arch/x86/configs/x86_64_defconfig linux-msft-5.4.y bzImage.txt

What are you referring to as "it"?

koumaza commented 4 years ago

Just run cat /proc/version if you want the accurate version information.

Ah. 5.7.0-next-20200612-microsoft-standard

I thought this was linux-msft-5.4.y. That's a mistake.

Justsnoopy30 commented 4 years ago

Just run cat /proc/version if you want the accurate version information.

Ah. 5.7.0-next-20200612-microsoft-standard

I thought this was linux-msft-5.4.y. That's a mistake.

Oh.

koumaza commented 4 years ago

I also built it. Use arch/x86/configs/x86_64_defconfig linux-msft-5.4.y bzImage.txt

doesn't boot...

Justsnoopy30 commented 4 years ago

It may be because of d70f2f9 Could someone possibly send me an image with that hack removed? I don't personally fancy using a hack and faking the kernel release just to make "VS Code's Remote WSL plugin" work (which I do not use).

Or how could I remove the hack, add the working config, and build it myself?

koumaza commented 4 years ago
  1. remove this line strcpy(tmp.release, "4.19.104-microsoft-standard");

  2. yes ''|make KCONFIG_CONFIG=arch/x86/configs/wsl2_defconfig

Justsnoopy30 commented 4 years ago

remove this line strcpy(tmp.release, "4.19.104-microsoft-standard");

  1. yes ''|make KCONFIG_CONFIG=arch/x86/configs/wsl2_defconfig

And git clone the repo first on the next branch, right? Also, what is this doing:

yes ''|make KCONFIG_CONFIG=arch/x86/configs/wsl2_defconfig

koumaza commented 4 years ago
  1. git clone --depth=1 https://github.com/nathanchance/WSL2-Linux-Kernel.git -b next

    Also, what is this doing:

Build

Justsnoopy30 commented 4 years ago

I meant the KCONFIG_CONFIG part. It also says x86, not x64 in it.

koumaza commented 4 years ago

Means x86 architecture. x86_64 means 64bit extended. https://github.com/nathanchance/WSL2-Linux-Kernel/tree/next/arch/x86/configs

Justsnoopy30 commented 4 years ago

Oh, well I still need to build with this .config file

koumaza commented 4 years ago

Hmm, Since I have not tried Config, But probably because using Clang.

Justsnoopy30 commented 4 years ago

Could I just change KCONFIG_CONFIG to point to it, or do I need a different argument?

koumaza commented 4 years ago

Yeah, probably.

Justsnoopy30 commented 4 years ago

Why do you pipe it to yes ''?

nathanchance commented 4 years ago

This kernel should have no issues. As long as that is the case, I'll push the two local commits I have to fix everything.

After that, all you will need to do to build a working kernel without that version hack is:

$ curl -LSs https://github.com/nathanchance/WSL2-Linux-Kernel/commit/d70f2f91a08a610392dc1e4b451b93e0e5db74bd.patch | git apply -R

$ make -skj"$(nproc)" wsl2_defconfig bzImage
Justsnoopy30 commented 4 years ago

This kernel should have no issues. As long as that is the case, I'll push the two local commits I have to fix everything.

After that, all you will need to do to build a working kernel without that version hack is:

$ curl -LSs https://github.com/nathanchance/WSL2-Linux-Kernel/commit/d70f2f91a08a610392dc1e4b451b93e0e5db74bd.patch | git apply -R

$ make -skj"$(nproc)" wsl2_defconfig bzImage

Yay!

Justsnoopy30 commented 4 years ago

Confirmed working!

onomatopellan commented 4 years ago

@nathanchance Thanks, it works. But as you can see in free -h it can't create the swap file.

nathanchance commented 4 years ago

The original issue has been fixed in v31 so I am closing this.

I will try to investigate the swapon issue as I find time.