I had an issue with my WSL after enabling systemd, it was stuck initializing. I have an arch distro set up, so this might be specific to that.
WSL-Version: 2.0.9.0
Kernelversion: 5.15.133.1-1
Windows 11
After searching for solutions online and looking at the services systemd was trying to start I found that "systemd-firstboot.service" was stuck on activating. I fixed this by killing the (irstboot) process it had started, after which
$ sudo systemctl status
Showed a degraded state, and restarting the service wasn't possible because the Firstboot condition wasn't met (which should have been the case before since I already used wsl before that)
I restarted my wsl with
PS $ wsl --shutdown
PS $ wsl
and voila systemd initialized without issue. I solved my issue with this, however is there another less crude way to solve this? What Parameter does systemd look at to determine if the system is booting for the first time?