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

Kernel crashes when enable systemd on wsl2 #336

Open
zuoxinyu opened this issue Nov 11, 2023 · 1 comment
Open

Kernel crashes when enable systemd on wsl2 #336

zuoxinyu opened this issue Nov 11, 2023 · 1 comment

Comments

@zuoxinyu
Copy link

IMPORTANT
Please read README and Docs before creating the issue.

Please fill out the below information:
Describe the issue

Kernel crashes with signal segmentfault when enable systemd on wsl2. The wsl command stucks.

To Reproduce
Steps to reproduce the behavior:

  1. Enable systemd by editing /etc/wsl.conf/ ( [boo] systemd=true)
  2. wsl --shutdown
  3. wsl

Expected behavior
A clear and concise description of what you expected to happen.

Arch start normally with systemd on

Screenshots
If applicable, add screenshots to help explain your problem.
image

Enviroment:

  • Windows build number: Microsoft Windows [版本 10.0.23585.1001]
  • Security Software: Windows Defender
  • WSL version 1/2: WSL2
  • ArchWSL version [e.g. 19.3.7.0] I don't know, this instance is import from a ext4.vhdx
  • ArchWSL Installer type zip/appx/other clean/update [e.g. appx update] import from ext4.vhdx
  • Launcher version [e.g. 19030700] (Type Arch.exe version at a Command Prompt)

Additional context
Add any other context about the problem here.

I can recover arch by uninstalling Windows Subsystem for linux (the store version)

@zuoxinyu zuoxinyu changed the title Kernel crash when enable systemd on wsl2 Kernel crashes when enable systemd on wsl2 Nov 11, 2023
@awcator
Copy link

awcator commented Dec 3, 2023

I'm using this method to get systemd up and running.
from arch:
pacman -Syyu cargo
cargo install subsystemctl

from cmd:
wsl -u root -- subsystemctl start
wsl -u root -- subsystemctl shell --uid=0
wsl -u root -- subsystemctl shell --uid=1000 //for ur user
now this shell will hv systems.

Refernces: https://github.com/sorah/subsystemctl

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