Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

==> (FIX) Here is a fix for those that has issues starting WSL after using this script <=== #96

Closed
codekuu opened this issue Feb 23, 2023 · 3 comments

Comments

@codekuu
Copy link

codekuu commented Feb 23, 2023

  1. Open up powershell and write wsl -d DISTRONAME -u root
  2. Delete /usr/sbin/start-systemd-namespace and /usr/sbin/enter-systemd-namespace (rm -rf XXX)
  3. Edit the file /etc/bash.bashrc using your favorite text editor
    and comment out source /usr/sbin/start-systemd-namespace
    It should look something like:
# Start or enter a PID namespace in WSL2
# source /usr/sbin/start-systemd-namespace

Tada you should now be able to start the WSL again! You can remove those two lines as well if you want.

@codekuu codekuu changed the title (FIX) Here is a fix for those that has issues starting WSL after using this script ==> (FIX) Here is a fix for those that has issues starting WSL after using this script <=== Feb 23, 2023
@IdaEdz
Copy link

IdaEdz commented Feb 28, 2023

Not strictly running the script, but after following the guide previous to this script; I get the following error trying to start wsl as you discribed.

>wsl -d DISTRONAME -u root
/usr/sbin/enter-systemd-namespace: line 10: /usr/sbin/daemonize: No such file or directory

@codekuu
Copy link
Author

codekuu commented Feb 28, 2023

@OskyEdz you can open the windows file explorer and go into the WSL disk and do the above instead of using the WSL cli.
image

@aki-k
Copy link

aki-k commented Apr 1, 2023

@codekuu I'm not sure how you think removing this setup is fixing it? There's a real fix in comment #36 (comment) for Ubuntu-22.04. For Ubuntu-20.04 this script "just works".

@codekuu codekuu closed this as completed Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants