-
Notifications
You must be signed in to change notification settings - Fork 871
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
WSL2 - Failed to (auto)start systemd units on boot | /sbin/init failed #11822
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
Diagnostic information
|
See #8879 |
Thank you @0Styless. Let's see if this is a timeout issue. Can you add:
To |
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-file it as a new issue. Thank you! |
That settting gave me this:
Setting
|
I just solved this same issue. Here are the steps I followed:
marcos@MARCOS-LAPTOP /home/marcos $ ps -p 1 -o comm=
systemd # Should see "systemd" instead of "init"
marcos@MARCOS-LAPTOP /home/marcos $ systemd-analyze blame
1min 35ms NetworkManager-wait-online.service
811ms landscape-client.service
759ms NetworkManager.service
519ms user@1000.service
472ms snapd.seeded.service
397ms user@128.service
310ms snapd.service
289ms cups.service
272ms udisks2.service
243ms dev-sdc.device
218ms wsl-pro.service
210ms gnome-remote-desktop.service
196ms polkit.service
193ms power-profiles-daemon.service
176ms accounts-daemon.service
165ms systemd-resolved.service
164ms systemd-logind.service
135ms rsyslog.service
115ms switcheroo-control.service
111ms colord.service
93ms systemd-udevd.service
88ms avahi-daemon.service
86ms systemd-udev-trigger.service
86ms pulseaudio-enable-autospawn.service
85ms systemd-timesyncd.service
74ms systemd-journal-flush.service
62ms e2scrub_reap.service
62ms dbus.service
61ms gdm.service
60ms gpu-manager.service
55ms wpa_supplicant.service
51ms rtkit-daemon.service
44ms var-snap-firefox-common-host\x2dhunspell.mount
43ms keyboard-setup.service
42ms systemd-journald.service
42ms systemd-update-utmp-runlevel.service
38ms snap-bare-5.mount
37ms snap-core22-1722.mount
37ms snap-core22-1748.mount
35ms snap-firefox-5783.mount
33ms dev-hugepages.mount
33ms dev-mqueue.mount
33ms sys-kernel-debug.mount
32ms sys-kernel-tracing.mount
31ms snap-firefox-5889.mount
29ms snap-firmware\x2dupdater-167.mount
27ms snap-gnome\x2d42\x2d2204-176.mount
25ms snap-gnome\x2d42\x2d2204-202.mount
24ms modprobe@configfs.service
24ms modprobe@dm_mod.service
24ms systemd-tmpfiles-setup-dev-early.service
23ms modprobe@drm.service
23ms snap-gtk\x2dcommon\x2dthemes-1535.mount
22ms modprobe@efi_pstore.service
22ms modprobe@fuse.service
22ms systemd-tmpfiles-setup.service
marcos@MARCOS-LAPTOP /home/marcos $ sudo systemctl status NetworkManager-wait-online.service
[sudo] password for marcos:
× NetworkManager-wait-online.service - Network Manager Wait Online
Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2025-03-11 16:19:41 CET; 4min 38s ago
Docs: man:NetworkManager-wait-online.service(8)
Process: 600 ExecStart=/usr/bin/nm-online -s -q (code=exited, status=1/FAILURE)
Main PID: 600 (code=exited, status=1/FAILURE)
Mar 11 16:18:41 MARCOS-LAPTOP systemd[1]: Starting NetworkManager-wait-online.service - Network Manager Wait Online...
Mar 11 16:19:41 MARCOS-LAPTOP systemd[1]: NetworkManager-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Mar 11 16:19:41 MARCOS-LAPTOP systemd[1]: NetworkManager-wait-online.service: Failed with result 'exit-code'.
Mar 11 16:19:41 MARCOS-LAPTOP systemd[1]: Failed to start NetworkManager-wait-online.service - Network Manager Wait Online. marcos@MARCOS-LAPTOP /home/marcos $ sudo systemctl disable NetworkManager-wait-online.service
Removed "/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service". marcos@MARCOS-LAPTOP /home/marcos $ sudo systemctl mask NetworkManager-wait-online.service
Created symlink /etc/systemd/system/NetworkManager-wait-online.service → /dev/null. marcos@MARCOS-LAPTOP /home/marcos $ sudo systemctl status NetworkManager-wait-online.service
× NetworkManager-wait-online.service
Loaded: masked (Reason: Unit NetworkManager-wait-online.service is masked.)
Active: failed (Result: exit-code) since Tue 2025-03-11 16:19:41 CET; 4min 59s ago
Main PID: 600 (code=exited, status=1/FAILURE)
Mar 11 16:18:41 MARCOS-LAPTOP systemd[1]: Starting NetworkManager-wait-online.service - Network Manager Wait Online...
Mar 11 16:19:41 MARCOS-LAPTOP systemd[1]: NetworkManager-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Mar 11 16:19:41 MARCOS-LAPTOP systemd[1]: NetworkManager-wait-online.service: Failed with result 'exit-code'.
Mar 11 16:19:41 MARCOS-LAPTOP systemd[1]: Failed to start NetworkManager-wait-online.service - Network Manager Wait Online.
wsl --shutdown
# Then launch again
|
Windows Version
Microsoft Windows [Version 10.0.22621.3737]
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1-2
Distro Version
Ubuntu 24.04
Other Software
No response
Repro Steps
Upgrade Ubuntu 22.04 to Ubuntu 24.04 with
do-release-upgrade
Expected Behavior
Everything works fine, systemd services would start as before.
Actual Behavior
Systemd services do not start correctly. In
dmesg
I can see[ 11.253131] WSL (2) ERROR: WaitForBootProcess:3342: /sbin/init failed to start within 10000
(see attached diagnostic logs).After WSL / distro is started, I tried the following:
As you can see, the status is inactive (dead), expected behavior is that the service is up & running.
I also can start the service "per hand":
Diagnostic Logs
dmesg
:The text was updated successfully, but these errors were encountered: