System has not been booted with systemd as init system (PID 1) |
I have Ubuntu 20.4 in Windows ( WSL2 ), when in
reloading any service I'm getting below error
Error:
failed to connect to bus: host is down
failed to connect to bus: host is down wsl2
System has not been booted with systemd as
init system (PID 1). Can't operate. Failed to connect to bus: Host is down
Solution
:
1 – Update the system
sudo apt-get update
2 – Install below package
sudo apt-get install -yqq daemonize dbus-user-session fontconfig
3 – execute below command to fix the issue
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
4 – check the version
snap version
Enjoy!
Now we can restarted the system service without error,
I hope this topic gave you all the information you needed. If you have any further questions or would like more detailed directions feel free to contact us using any of the following sources.We look forward to talking to you.
I ran all the commands as suggested. But it did not fix the problem. For me snap version returns the following:
ReplyDeletesnap 2.44.3+20.04
snapd unavailable
series 16
Windows Subsystem for Linux -
kernel 4.4.0-19041-Microsoft (amd64)
Any help to resolve the issue will be greatly appreciated.
I have followed and executed every single command above, but system still can't reboot.
ReplyDeletemmm@DESKTOP-8BG3OFE:~$ sudo reboot
[sudo] password for mmm:
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Failed to talk to init daemon.
mmm@DESKTOP-8BG3OFE:~$
any other missing commands?
Thx