Closed Marietto2008 closed 4 years ago
See #2. The solution until the script is improved is to edit your local copy of /usr/sbin/enter-systemd-namespace
changing /usr/sbin/daemonize
to /usr/bin/daemonize
.
You can fix a broken installation by running in a powershell terminal (only the problem with daemonize
will be fixed by the following):
wsl.exe -u root -e sed -i 's|/usr/sbin/daemonize|/usr/bin/daemonize|g' /usr/sbin/enter-systemd-namespace
Thanks, that command fixed it. One minor issue tho - after starting Ubuntu again I got an error:
/bin/cat: /root/.systemd-env: No such file or directory
It seems the file ".systemd-env" gets created in the user's home directory, but enter-systemd-namespace is looking for it in root's home. I don't know whether it's the result of the initial install or the above command, but copying .systemd-env to /root makes it go away. The error seems to be harmless, however.
Thanks. Same problem after latest upgrade (took about 1 hour or more). The script fixed the problem. Hope everything is ok now (don't realy know what happend)
I've ran your script inside an ubuntu 20 / WSL2 installation,when I closed the distribution and I have reopened the terminal,this is what happened.
λ wsl /usr/sbin/enter-systemd-namespace: line 10: /usr/sbin/daemonize: No such file or directory
man,I can't run any other wsl2 system. this is a critical problem.