mvaisakh/wsl-distro-tars

[Arch] Systemd problem.

Opened this issue · 3 comments

When I enable systemd on Arch Linux in the official way, here's an example:

[root@redstar ~]# cat /etc/wsl.conf
[boot]
systemd=true

It crashes and won't start, I executed a systemd-analyze to see what's going on and it returned this:

[root@redstar ~]# systemd-analyze
Bootup is not yet finished (org.freedesktop.systemd1.Manager.FinishTimestampMonotonic=0).
Please try again later.
Hint: Use 'systemctl list-jobs' to see active jobs

If you want to know which services are running, here they are:

[root@redstar ~]# systemctl list-jobs
JOB UNIT                              TYPE  STATE
3   basic.target                      start waiting
91  systemd-homed.service             start waiting
74  timers.target                     start waiting
86  systemd-logind.service            start waiting
93  systemd-user-sessions.service     start waiting
75  archlinux-keyring-wkd-sync.timer  start waiting
92  systemd-homed-activate.service    start waiting
94  getty.target                      start waiting
42  systemd-machine-id-commit.service start waiting
95  console-getty.service             start waiting
56  systemd-pcrphase-sysinit.service  start waiting
82  dbus.socket                       start waiting
4   sysinit.target                    start waiting
2   multi-user.target                 start waiting
80  sockets.target                    start waiting
103 dbus.service                      start waiting
1   graphical.target                  start waiting
60  first-boot-complete.target        start waiting
76  shadow.timer                      start waiting
59  systemd-firstboot.service         start running
7   systemd-pcrphase.service          start waiting
77  systemd-tmpfiles-clean.timer      start waiting
96  getty@tty1.service                start waiting

23 jobs listed.
[root@redstar ~]# systemctl
  UNIT                                        LOAD   ACTIVE     SUB       JOB   DESCRIPTION

...
systemd-firstboot.service                     loaded activating start     start First Boot Wizard
...

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
JOB    = Pending job for the unit.

137 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

I found this, it's probably the cause of the problem.

Hi, I'm really sorry for the late reply, been busy. I will take a look at this in a few days.
This problem would likely traceback to wsl itself rather than the distro.

A solution here:
Ubuntu 22.04 with systemd can't start
.

create symbolic /usr/sbin/init -> /lib/systemd/systemd

See if it works for your Arch distro.