WSL: WSL Can't start after enabling systemd
Version
10.0.22621.1105
WSL Version
- WSL 2
- WSL 1
Kernel Version
5.15.79.1
Distro Version
openSUSE-Leap-15.4
Other Software
No response
Repro Steps
Followed Instructions to enble Systemd from this Article
Set the system flag set in your WSL distro settings
You will need to edit the wsl.conf file to ensure systemd starts up on boot.
Add these lines to the /etc/wsl.conf (note you will need to run your editor with sudo privileges, e.g: sudo nano /etc/wsl.conf):
[boot]
systemd=true
And close out of the nano editor using CTRL+O to save and CTRL+X to exit.
Final steps
With the above steps done, close your WSL distro Windows and run wsl.exe --shutdown from PowerShell to restart your WSL instances. Upon launch you should have systemd running. You can check this with the command systemctl list-unit-files --type=service which should show your services’ status.
Expected Behavior
Expected WSL to start with Sytemd enabled
Actual Behavior
After Restarting WSL i had the following error
Catastrophic failure
Error code: Wsl/Service/CreateInstance/E_UNEXPECTED
[process exited with code 4294967295 (0xffffffff)]
I cannot access any Resources related to my distro anywhere from terminal to file explorer
Diagnostic Logs
WslLogs-2023-01-18_10-47-21.zip
No response
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 19 (4 by maintainers)
Ran into this on a fresh openSUSE Leap 15.5 installation. It’s still a problem, and neither this nor #9602 should be closed imho.
I was able to recover my installation with the instructions in #9602 for mounting the vhdx and enable systemd by adding the missing
/sbin/initsymlink also described in the ticket.My WSL instance stopped working because of this line how can i fix it? Is there some kind of switch to start WSL instance without this config?
I’m having the same problem, just after enabling systemd:
Here is my logs
WslLogs-2023-02-05_18-55-12.zip
This issue has been automatically closed since it has not had any author activity for the past 7 days. If you’re still experiencing this issue please re-open it.
Thank you!
See https://github.com/microsoft/WSL/issues/9602#issuecomment-1421897547 ; If you’re having the same issue in Leap, this is most likely the fix ; I fixed it overall a few months ago (and since I add my repo to new installs, in general) I’ve gotten accustomed to
zypper in -t pattern wsl_systemdwhich includes my fix.