ubuntu-wsl2-systemd-script icon indicating copy to clipboard operation
ubuntu-wsl2-systemd-script copied to clipboard

Sleeping for 1 second to let systemd settle nsenter: cannot open /proc/25/ns/time: No such file or directory

Open ghost opened this issue 3 years ago • 6 comments

image

ghost avatar Mar 23 '22 02:03 ghost

+1 我也是这情况

UsamiRenko04 avatar Mar 30 '22 01:03 UsamiRenko04

Same here

CleanHit avatar May 07 '22 21:05 CleanHit

@lyh2048 https://github.com/DamionGans/ubuntu-wsl2-systemd-script/issues/76#issuecomment-1122717349

CleanHit avatar May 10 '22 18:05 CleanHit

+1

n1klaus avatar Jun 25 '22 16:06 n1klaus

same here

shixinwang avatar Aug 15 '22 07:08 shixinwang

Assuming you didn't install this on root you can start wsl as root using:

 wsl --user root

Because this installs on the bash init script you should be able to log in (at least I could)

From root I was able to run the uninstall script from this fork: https://github.com/FiestaLake/ubuntu-wsl2-systemd-script/blob/master/uninstall.sh

(Or a slightly modified version to run as the root user)

self_dir=$(pwd)
rm -rf /usr/sbin/start-systemd-namespace
rm -rf /usr/sbin/enter-systemd-namespace
rm -rf /etc/sudoers.d/systemd-namespace

cd /var/tmp
if [ -f "/etc/bash.bashrc" ]; then
sudo grep -v "# Start or enter a PID namespace in WSL2
export USE_WSLG_SOCKET=false
export USE_WSLG_SOCKET=true
source /usr/sbin/start-systemd-namespace" /etc/bash.bashrc > tmpfile
sudo mv tmpfile /etc/bash.bashrc
fi
cd $self_dir

Hope this helps restore your envirnoment.

myxoh avatar Oct 04 '22 17:10 myxoh