Code Monkey home page Code Monkey logo

Comments (10)

nzbr avatar nzbr commented on June 14, 2024 2

There is no /bin/mount in the installer. That leads to /mnt/* not being mounted, which in turn means that WSL can't cd to the current working directory (so it defaults to /root). For now you should be able to fix this by running wsl -t NixOS to restart the distribution once.
Could you open a separate issue for this? So that it gets addressed in a future release

from nixos-wsl.

michas2 avatar michas2 commented on June 14, 2024 1

Will do. Thanks!

from nixos-wsl.

Hajitorus avatar Hajitorus commented on June 14, 2024

I got around this by touching the systemd.pid file.

from nixos-wsl.

grantbevis avatar grantbevis commented on June 14, 2024

I can reproduce this @nzbr using nixos-wsl-installer.tar.gz

Using nixos-wsl-installer-fixed.tar.gz Works, can you try the fixed release @michas2 please?

from nixos-wsl.

michas2 avatar michas2 commented on June 14, 2024

Now it starts fine. Thanks! :)

from nixos-wsl.

michas2 avatar michas2 commented on June 14, 2024

When running a second time I get this:

> wsl -d NixOS
/bin/sh: line 1: cd: /root: Permission denied

Any idea where this comes from?

(At least afterwards I get a seemingly working prompt.)

from nixos-wsl.

nzbr avatar nzbr commented on June 14, 2024

What is the host-path that you ran wsl in?
In my experience, this happens, when WSL does not know which directory to start the shell in. Because the default user is set to root, it defaults to /root. Syschdemd then drops to the default user, who has no read permission on /root - thus resulting in that error. sh notices this and changes to the current users home (/home/nixos if you didn't change the username)

from nixos-wsl.

michas2 avatar michas2 commented on June 14, 2024

I simply ran it as described above:

wsl --import NixOS .\NixOS\ .\Downloads\nixos-wsl-installer-fixed.tar.gz --version 2
wsl -d NixOS

I ran it in powershell in my (default) user directory.

(I also noticed that /mnt/c/ is not mounted. not sure if that is on purpose or maybe a result of the failing command.)

from nixos-wsl.

michas2 avatar michas2 commented on June 14, 2024

BTW, after that error, the shell runs as user nixos in /home/nixos afterwards.

from nixos-wsl.

nixos-discourse avatar nixos-discourse commented on June 14, 2024

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-wsl-2-error-with-22-05-5c211b47-nsenter-failed-to-parse-pid-p/24238/1

from nixos-wsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.