Comments (27)
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/)
from container-systemd-init-tool.
I fixed script.
apply this commit change please...: 7f93f5e
to /boot/init_wsl2/script.sh
from container-systemd-init-tool.
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.
from container-systemd-init-tool.
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
from container-systemd-init-tool.
I am getting the same error with WSL2 after running the following commands:
pacman-key --init
pacman-key --populate archlinux
pacman -Syu
from container-systemd-init-tool.
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/)
This does work, but it's not really an optimal solution.
from container-systemd-init-tool.
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.
Yep, I'm getting this now.
from container-systemd-init-tool.
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.
I got this problem too but I don't update kernel
from container-systemd-init-tool.
I got this problem too when I start the wsl2 second time
nsenter: cannot open /proc/13/ns/time: No such file or directory
from container-systemd-init-tool.
I fixed script.
apply this commit change please...: 7f93f5eyou can enter emergency console with this command:
wsl -d Arch2 --exec "/usr/.bin/bash"export PATH=/usr/.bin:$PATH vim /boot/init_wsl2/script.sh
Applying this patch appears to have resolved the issue for me. Thanks @yuk7 !
from container-systemd-init-tool.
@yuk7 hello, is there any new way could fix this problem?
from container-systemd-init-tool.
I fixed script.
apply this commit change please...: 7f93f5eyou can enter emergency console with this command:
wsl -d Arch2 --exec "/usr/.bin/bash"export PATH=/usr/.bin:$PATH vim /boot/init_wsl2/script.sh
worked well
from container-systemd-init-tool.
I fixed script.
apply this commit change please...: 7f93f5e
you can enter emergency console with this command:wsl -d Arch2 --exec "/usr/.bin/bash"export PATH=/usr/.bin:$PATH vim /boot/init_wsl2/script.shApplying this patch appears to have resolved the issue for me. Thanks @yuk7 !
Need to compile from source for applying that patch? I am kinda confused
from container-systemd-init-tool.
Need to compile from source for applying that patch? I am kinda confused
@heller390, You can manually edit the /boot/init_wsl2/script.sh
script and change the line to match what is shown in commit 7f93f5e.
from container-systemd-init-tool.
Need to compile from source for applying that patch? I am kinda confused
@heller390, You can manually edit the
/boot/init_wsl2/script.sh
script and change the line to match what is shown in commit 7f93f5e.
It seems patched in the latest download. But exporting the path is giving error " /boot../*.sh not a valid identifier"
from container-systemd-init-tool.
@yuk7 hello, is there any new way could fix this problem?
I tried with patching the latest commit also . But still not working!
from container-systemd-init-tool.
from container-systemd-init-tool.
Yup, works fine after updating. No need to reinstall.
from container-systemd-init-tool.
For some reason, the startup script is located for me not in /boot/init_wsl2/script.sh
but /init_wsl2/script.sh
.
I got this error when running wsl
:
nsenter: cannot open /proc/6/ns/time: No such file or directory
- Applying the patch provided by @yuk7 didn't work
- Downloading the latest relase & overwriting Arch2.exe and rootfs.tar.gz did not work
I can get into the bash but that's it.
from container-systemd-init-tool.
@yuk7 This still happens with newest util-linux
and I can't find any suitable fix. Kindly reopen.
from container-systemd-init-tool.
@yuk7 This still happens with newest
util-linux
and I can't find any suitable fix. Kindly reopen.
In case someone is still running into this issue or has util-linux
and lib-util-linux
in IgnorePkg, then it seems to be fixed now on master branch (d1deab1).
You can simply overwrite the files in /boot/init_wsl2
with the ones from master and then you can update util-linux
, etc.
mkdir /boot/init_wsl2/backup
cp /boot/init_wsl2/{isocon_sh.sh,script.sh,syncbin.sh,wsl2_isocond.sh} /boot/init_wsl2/backup/
cd /tmp
git clone https://github.com/yuk7/container-systemd-init-tool.git
cp /tmp/container-systemd-init-tool/{isocon_sh.sh,script.sh,syncbin.sh,wsl2_isocond.sh} /boot/init_wsl2/
chmod +x /boot/init_wsl2/{isocon_sh.sh,script.sh,syncbin.sh,wsl2_isocond.sh}
from container-systemd-init-tool.
/boot/init_wsl2
didn't even exist in the first place- I simply copied the files you mentioned from master into the newly created folder
- I updated util-linux to the newest version
- I am getting the same error again (
nsenter: cannot open /proc/6/ns/time: No such file or directory
)
from container-systemd-init-tool.
/boot/init_wsl2
didn't even exist in the first place- I simply copied the files you mentioned from master into the newly created folder
- I updated util-linux to the newest version
- I am getting the same error again (
nsenter: cannot open /proc/6/ns/time: No such file or directory
)
Hmm, are you using the (now deprecated) Arch2 systemd version that was in this repo? Or are you using https://github.com/yuk7/ArchWSL?
I'm using the deprecated version myself
EDIT:
I see that previously you mentioned that the scripts were located under /init_wsl2/ and not /boot/init_wsl2/
Does copying the files from master over /init_wsl2/ change anything for you?
from container-systemd-init-tool.
I am running ArchWSL2, how this repository was previously named (#30). I don't know, how ArchWSL2 is related to this repo anymore...
Copying the file changes the error message, now I get runuser: failed to execute : No such file or directory
instead.
EDIT: It seems that the original ArchWSL also supports wsl2, and it is not broken with the newer util-linux versions, I think I just have to delete my current wsl installation and create a new one based on ArchWSL
from container-systemd-init-tool.
The scripts on master have hard coded links to /boot/init_wsl2
, perhaps your issues are related to that, you can try replacing /boot/init_wsl2
with /init_wsl2
cd /init_wsl2
sed -i -- 's/\/boot\/init_wsl2/\/init_wsl2/g' *.sh
My understanding was that while ArchWSL also supports wsl2, it doesn't contain systemd like ArchWSL2 did
from container-systemd-init-tool.
you can try replacing /boot/init_wsl2 with /init_wsl2
Same error.
EDIT: The error is that isocon_sh.sh
is called without a parameter, because $INIT_WSL_UID is empty (script.sh
)
My understanding was that while ArchWSL also supports wsl2, it doesn't contain systemd like ArchWSL2 did
As far as I remember, ArchWSL didn't support wsl2 back when this repo was created.
(btw did you know that you can also use |
instead of /
for as the command seperator in sed, so you don't need the \/
for path elements: sed -i -- 's|/boot/init_wsl2|/init_wsl2|g' *.sh
)
from container-systemd-init-tool.
@gardar I'm currently trying to create a fresh Arch installation based yuk7/ArchWSL and for that I need my old data from the borked installation. Do you have any idea where the home folder normally would be mounted from? Because in my borked installation, the home folder is now empty. Also, installing the old nsenter doesn't fix it either
from container-systemd-init-tool.
Related Issues (20)
- Fakeroot-tcp HOT 4
- Update process question and concise wiki request HOT 2
- Docker WSL2 integration: /mnt/wsl size is zero HOT 4
- Why is this needed? HOT 6
- Drives not being mounted correctly HOT 5
- df report error after update to [ALPHA] 20062900 HOT 4
- sleep: cannot read realtime clock: Invalid argument HOT 1
- Realtime Clock Error HOT 1
- Uninstalling 'daemonize' is critical
- chmod: changing permissions of '/mnt': Operation not permitted
- Is it suitable for daily development HOT 2
- Is there a way to upgrade the distro? HOT 4
- "Press any key to continue" should be "Press enter to continue" HOT 3
- Cannot run Arch with or without WSL1/2 HOT 1
- Scoop app manifest for ArchWSL2 made
- Can't create '/usr/i686-w64-mingw32/bin/...' when installing mingw-w64-binutils.
- Element not found Error HOT 7
- Memory Reclamation Failed HOT 1
- future of ArchWSL2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from container-systemd-init-tool.