-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Genie 2.4 breaks WSL interop on Windows 10 #287
Comments
I just noticed #264. Apparently, the binfmt wrapper's behaviour is inconsistent between Windows 10 and release versions of Windows 11, not just insider previews. So for Windows 10 users (like myself, because my perfectly good i7 7700K is not recent enough for Windows 11 😖), the change introduced in ebca3e3 straight up breaks WSL, while it is absolutely required on Windows 11... |
Manual update of /usr/lib/binfmt.d/WSLInterop.conf to revert change mentioned above seems to fix issue on Win10/Debian. |
@Elberet Not that it has anything to do with your issue, but I'm curious about the following in your installation procedure:
Where does that come from? I see the same in another bug report, but is that the correct syntax? Shouldn't it be?
The line as it is creates:
With double-dots, which doesn't seem correct, right? |
You're right, that's probably a simple typo in my script. It shouldn't have any effect on the interop issue, tho. |
Trying to parse this, so to fix /usr/lib/binfmt.d/WSLInterop.conf is set with P or PF? |
The correct set of flags depends on the Windows version:
Genie 2.4 now defaults to The reason for this difference is that the behaviour of the WSL helper binary ( A full explanation of what these flags mean can be found at https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst. |
Fixed in 2.5, shipping as soon as a psutil issue is resolved. |
Windows version (build number): Windows 10 21H2 (19044.1766)
Linux distribution: Ubuntu 20.04
Kernel version: 5.10.102.1-microsoft-standard-WSL2
Genie version: genie 2.4
Describe the bug
Genie 2.4 by default installs
/usr/lib/binfmt.d/WSLInterop.conf
. This file is used by systemd to register the miscellaneous binary wrapper for WSL interop in the kernel. The registration includes a set of flags that tell the kernel how to interact with the wrapper. At least for my local Windows machine, these flags are wrong and result in WSL Linux becoming unable to launch any Windows binaries through the WSL/init
wrapper.To Reproduce
Steps to reproduce the behavior:
wsl -u root
orsudo su -
):reg.exe
ended up being called with the Linuxargv[0]
as an additional command line argument, preceding the expected arguments, and failed with an error message.Expected behavior
Genie should not break WSL interop. Specifically, if the binfmt misc configuration depends on the Windows version, Genie should detect the version it is running on and adjust the binfmt configuration to match. If the Windows version is not or no longer supported, Genie should at least emit a noticeable warning.
Additional context
The change to
/usr/lib/binfmt.d/WSLInterop.conf
was introduced in response to #267, where a user on Windows 10.0.22598.200 reported a problem with WSL interop. Build 22598 is a Windows 11 insider preview build, not a full release.I confirm that I have read the ENTIRE supplied readme file and checked for relevant information on the repository wiki before raising this issue, and that if the solution to this issue is found in either location, it will be closed without further comment:
The text was updated successfully, but these errors were encountered: