WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
739 stars 53 forks source link

Fedora remix distro doesn't start correctly: no user space created, nothing works #117

Open PavelSosin-320 opened 3 years ago

PavelSosin-320 commented 3 years ago

Describe the bug When started using Fedora distro launcher distro doesn't start correctly: no user space create for the root, no pam service invoked to create user spaces, no login. /run/user/$UID doesn't exist

To Reproduce Steps to reproduce the behavior:

  1. Instal Fedora34 remix 34.3 final Separate problem: it doesn't replace or creates a new RootFS vhdx with the new name, just mapping onto old RootFS.

  2. Run the distro using App launcher

  3. Run Podman info

  4. Get Error: error creating tmpdir: mkdir /run/user/1000/libpod: permission denied

  5. Check ls /run/user/ no such directory - user spaces root directory is not created.

Expected behavior It works if all users are correctly created and after login using genie -l

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Every user must be logged using pam that invoks logind that invokes user@ that is responsible for userspace maintenance. Indeed, Root and rootless users are very different but every user has his own user space: /run/user/0,1000,1001.... Users can't use shared /tmp/ that doesn't exist and have to mount userspace using FUSE supported by new Kernel and bundled with Fedora34. Check mount.fuse3 and other FUSE mount utilities per FS type, they are part of Fedora, All rootless users must be created using useradd, otherwise user@ unit doesn't exist Basic Troubleshooting Checklist

[X ] I have searched Google for the error message: old but solved issue [ ] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [X ] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [ ] I have searched the WLinux issues page: https://github.com/WhitewaterFoundry/WLinux/issues. [ ] I have reset WLinux: Settings->Apps->Apps & features->WLinux->Advanced Options->Reset. [ ] I have disabled and re-enabled WSL in Windows Features. [ ] I have run Windows 10 updates and restarted.

What other troubleshooting have you attempted?

Insert here:

WLinux Version

FedoraRemix for WSL ver 34.3. WSL Kernel version Linux MSI-wsl 5.10.16.3-microsoft-standard-WSL2 Windows Build

PavelSosin-320 commented 3 years ago

The bright side: the cause of the error is keeping Windows user when login in Linux. Linux session is created by pam only after user and password prompts have been answered. Before it user has no session, i.e. no attributes. See loginctl show session or user

PavelSosin-320 commented 3 years ago

@crramirez The solution is: after Initialization using genie -s I use Windows terminal with multiple sessions started by the command line wsl ... -u root genie -l login: ... password: .... Every WT tab is a separate session created by a separate user. It's easy to compare session behavior depending on user definition and history. Thanks to systemd session management every session has its own userspace: /run/user/0, /run/user/1000, /run/user/2001,....