Comments (10)
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.
Will do. Thanks!
from nixos-wsl.
I got around this by touching the systemd.pid file.
from nixos-wsl.
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.
Now it starts fine. Thanks! :)
from nixos-wsl.
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.
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.
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.
BTW, after that error, the shell runs as user nixos
in /home/nixos
afterwards.
from nixos-wsl.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
from nixos-wsl.
Related Issues (20)
- nu shell (nushell) with no PATH set on nixos-wsl HOT 15
- How can I run NixOS on WSL2 on Windows 11 inside VirtualBox?
- Unable to connect to internet and update channels upon creating NixOS WSL2 instance HOT 8
- Launcher: Check if WSL is installed
- Launcher: Start in home directory if started from shortcut
- Mount path /tmp/.X11-unix/X0 is not canonical (contains a symlink) HOT 20
- How to edit wsl.conf for initial config? HOT 4
- nvidia-container-toolkit-cdi-generator not work HOT 5
- `sudo` did not request for a password HOT 4
- Configure NIX_SSL_CERT_FILE with WSL2 and ZSCALER or similar enterprise Proxy HOT 1
- Rancher desktop support HOT 2
- How-To Doc HOT 1
- Document how to convert an existing installation to using flakes HOT 1
- /run/user/<id>/wayland-0 does not exist - Wayland GUI applications do not work HOT 2
- Hardware acceleration does not work without LD_LIBRARY_PATH hacks HOT 7
- doc bug: possibly missing "--version 2"
- Action Required: Fix Renovate Configuration
- User session immediately ends due to shell wrapper HOT 1
- Use of environment.sessionVariables.PATH interferes with system rebuild
- Help Needed - Failing upgrading to NixOS 24.05 HOT 2
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 nixos-wsl.