WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Unable to start WSL2

Open 7-zete-7 opened this issue 4 years ago • 6 comments

Version

Microsoft Windows [Version 10.0.22000.1281]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

Linux version 5.15.74.2-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Nov 2 19:50:29 UTC 2022

Distro Version

WLinux

Other Software

Docker Desktop (Windows), version 4.14.1

Repro Steps

Just run distro or start it by wsl.exe -d WLinux command.

Expected Behavior

Prompt on started distro.

Actual Behavior

Errors

<3>WSL (211) ERROR: CreateProcessEntryCommon:559: chdir(/home/zete7) failed 5
<3>WSL (211) ERROR: CreateProcessEntryCommon:570: execvpe /usr/bin/zsh failed 5
<3>WSL (211) ERROR: CreateProcessEntryCommon:579: Create process not expected to return

and process ending with code 1

Diagnostic Logs

WslLogs-2022-11-18_12-41-04.zip

7-zete-7 avatar Nov 18 '22 09:11 7-zete-7

By command

wsl.exe -d WLinux -u root -e sh

I can access to distro. But next command on distro

cat /proc/version

I give this message

sh: 1: cat: Input/output error

7-zete-7 avatar Nov 18 '22 09:11 7-zete-7

The issue seems to be WLinux specific and not related to WSL itself. The home directory and default shell are not set properly at the time of installation/creation of the distribution.

Biswa96 avatar Nov 18 '22 10:11 Biswa96

Probably there was some kind of file system error. None of the files could be read.

The problem was solved by exporting the distro (via the wsl.exe --export command) and importing it into a new distro.

7-zete-7 avatar Nov 18 '22 11:11 7-zete-7

I'm encounting same issue.

wsl version

wsl2

distro version

Ubuntu 22.04

error message

when run distro

<3>WSL (9) ERROR: CreateProcessEntryCommon:570: execvpe /bin/bash failed 2
<3>WSL (9) ERROR: CreateProcessEntryCommon:579: Create process not expected to return

roccho-dev avatar Dec 18 '22 11:12 roccho-dev

This happened with me too when i tried to reinstall my ubuntu distro. Any suggestions on how to fix this?

aasitvora99 avatar Dec 21 '22 20:12 aasitvora99

How did you reinstall it?

Biswa96 avatar Dec 22 '22 03:12 Biswa96