mvaisakh / wsl-distro-tars

A script that creates importable tar files for Windows Subsystem for Linux (WSL2). These files can be used to install any Linux distribution of your choice, provided it is available on Docker.
GNU General Public License v3.0
69 stars 8 forks source link

[Arch] Systemd problem. #8

Closed ruizlenato closed 3 weeks ago

ruizlenato commented 11 months ago

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.
ruizlenato commented 11 months ago
[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.

mvaisakh commented 9 months ago

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.

4thrun commented 2 months ago

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.

mvaisakh commented 3 weeks ago

Closing this issue due to inactivity by the OP.