-
Notifications
You must be signed in to change notification settings - Fork 827
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
Distro not booting with systemd enabled #9850
Comments
@quater please check with
Notice that PID=1 is |
@elsaco Thanks for your response and the suggestion. Yes, I see it's running.
So my expectation was wrong for the first process to be systemd. |
2 tasks
This was referenced Jun 11, 2024
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Windows Version
Microsoft Windows 10 Pro 10.0.19045 N/A Build 19045
WSL Version
1.1.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.90.1-microsoft-standard-WSL2
Distro Version
Ubuntu 22:04
Other Software
No response
Repro Steps
The Problem
I cannot get WSL 2 to run the Ubuntu 22.04 distro with systems.
The Steps
I have followed the steps as documented
https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/
https://ubuntu.com/blog/ubuntu-wsl-enable-systemd
wsl.conf
file with the commandsudo nano /etc/wsl.conf
.wsl --shutdown
wsl -d Ubuntu-20.04
ps 1
$ ps 1 PID TTY STAT TIME COMMAND 1 ? Ss 0:00 /sbin/init
The History
In August 2022, I got this freshly installed laptop, and right started to use WSL. The first thing I did was to enable WSL2, but I did not check whether there are new versions of WSL2 available.
Recently I had the need to install a service that required
systemd
. I then learned that WSL2 can run the distro with systemd. I then followed the steps provided at https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/ but it did not work. To see whether it's an issue with WSL2, I tried to get the WSL version by runningwsl --version
but that did not work either. Eventually, I learned that I can upgrade WSL2 with the commandwsl --update
command. Once done, thewsl --version
command started to work, which now displays1.1.3.0
.However, WSL2 refuses to run Ubuntu 22.04 or 20.04 with systemd as process 1. I then unregistered the distros in the hope that this will make it work by forcing them to download a new WSL distro but that did not work either.
Is there a bug with this particular version of Windows 10?
Expected Behavior
Distro to run
/lib/systemd/systemd
as process 1.Actual Behavior
Process 1 runs with init daemon.
$ ps 1 PID TTY STAT TIME COMMAND 1 ? Ss 0:00 /sbin/init
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: