Skip to content
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

Exec format error when systemd is enabled #184

Closed
4 of 7 tasks
asgeirn opened this issue Jan 6, 2023 · 2 comments
Closed
4 of 7 tasks

Exec format error when systemd is enabled #184

asgeirn opened this issue Jan 6, 2023 · 2 comments

Comments

@asgeirn
Copy link

asgeirn commented Jan 6, 2023

Describe the bug
After updating latest packages yesterday, I am getting Exec format error when running Windows executables within WSL2 Fedora. This worked up until yesterday(ish).

To Reproduce
Steps to reproduce the behavior:

  1. Edit /etc/wsl.conf, set systemd=true in [boot]
  2. Close all WSL windows, run wsl --shutdown in PowerShell / CMD window
  3. Open new Fedora Remix window, run explorer.exe
  4. See error

Expected behavior
Explorer window should open

Additional context
After disabling systemd, running Windows executables work just fine.

Basic Troubleshooting Checklist

What other troubleshooting have you attempted?

Insert here:

Disabling systemd. Also found information here regarding a binfmt.d entry that might work, but the link to the workaround is currently broken: microsoft/WSL#8843

WLinux Version

Find: Settings->Apps->Apps & features->WLinux->Advanced Options->Version.

Insert here: 1.0.3.0

Windows Build

Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here:

OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19045 N/A Build 19045
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free

For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number

@asgeirn
Copy link
Author

asgeirn commented Jan 6, 2023

Seems this was a glitch, cannot reproduce after restarting with systemd enabled again..

@asgeirn asgeirn closed this as completed Jan 6, 2023
@crramirez
Copy link
Contributor

I have seen this error before when the interop between WSL and Windows is broken. You can solve it with a wsl --shutdown, but sometimes you need a restart. The store version of WSL is not quite stable, and these errors happen.

Also, sometimes it freezes, and the wsl command stops responding, in that case, you need to go to Task Manager and kill the Windows Subsystem for Linux processes and wsl --shutdown until it restarts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants