container-systemd-init-tool: Cannot run distibution

nsenter: cannot open /proc/14/ns/time: No such file or directory

I keep getting this, and the arch doesn’t even start.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 27 (1 by maintainers)

Most upvoted comments

util-linux 2.36 causes it

edit: You can get the system to boot again by shutting down wsl (wsl --shutdown in powershell), creating a hyper-v vm with ext4.vhdx attached, booting to the arch installation media, mounting the drive, copying /usr/bin/nsenter to /mnt/usr/.bin/, shutting down, and detaching the drive from the vm. After that you should add libutil-linux and util-linux to pacman’s ignore list and downgrade both of them to 2.35.2 (files here https://archive.archlinux.org/repos/2020/07/20/core/os/x86_64/)

I fixed script. apply this commit change please…: 7f93f5e81b8add8ac124fef42d0e06fce61892c0 to /boot/init_wsl2/script.sh

I got a similar bug today

nsenter: cannot open /proc/6/ns/time: No such file or directory

[process exited with code 1]

Your fix unfortunately didn’t fix this particular one.

I also updated the kernel of my WSL2 distros, so maybe that is the cause for this one.

Okay I fixed it for now, although this is a very poor fix. For everyone facing the same nsenter: cannot open /proc/6/ns/time: No such file or directory (although keep in mind that this is a very bad fix)

wsl -u root --exec "/usr/.bin/bash"
bash-5.0# export PATH=/usr/.bin:$PATH

To get into an emergency shell as root.

Then, copy over an old copy of util-linux. /var/cache/pacman/pkg/ is pacman’s package cache. If that one file does not exist for you, look for any one older than 2.36 and copy this one over.

bash-5.0# cp /var/cache/pacman/pkg/util-linux-2.35.2-1-x86_64.pkg.tar.zst /tmp/
bash-5.0# cd /tmp
bash-5.0# unzstd util-linux-2.35.2-1-x86_64.pkg.tar.zst
bash-5.0# tar xf util-linux-2.35.2-1-x86_64.pkg.tar.zst
bash-5.0# cp nsenter /usr/.bin/nsenter

Now you’ve overwritten nsenter with the 2.35 version. If you really want to make sure, everything worked correctly (although you don’t have to):

bash-5.0# sha1sum nsenter
f7df362fb45c9c03bb1cd93713e33fc8ef5c043c  nsenter
bash-5.0# sha1sum /usr/.bin/nsenter
f7df362fb45c9c03bb1cd93713e33fc8ef5c043c  /usr/.bin/nsenter

compare the two files.

I can get back into my wsl installation now.

You still have to blacklist util-linux from pacman until this bug is fixed:

 > grep util-linux /etc/pacman.conf
IgnorePkg     = util-linux lib-util-linux

And keep in mind that you’re now running a partially upgraded version of util-linux which might cause bugs. I would suggest to downgrade both util-linux and lib-util-linux using pacman.

EDIT: It’s not HoldPkg (that one only disables uninstalling certain packages) but rather IgnorePkg