Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wsl cannot startup with error code: Wsl/WSL_E_USER_NOT_FOUND #12028

Closed
1 of 2 tasks
localvar opened this issue Sep 12, 2024 · 5 comments
Closed
1 of 2 tasks

wsl cannot startup with error code: Wsl/WSL_E_USER_NOT_FOUND #12028

localvar opened this issue Sep 12, 2024 · 5 comments

Comments

@localvar
Copy link

Windows Version

Microsoft Windows [版本 10.0.22631.4037]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 24.04

Other Software

No response

Repro Steps

using wsl.exe -d Ubuntu --cd ~ -u zlx to start wsl, it works fine yesterday, but wsl cannot start today and report below error message:

<3>WSL (11) ERROR: CreateProcessParseCommon:740: getpwnam(zlx) failed 17
找不到用户。
Error code: Wsl/WSL_E_USER_NOT_FOUND

[process exited with code 4294967295 (0xffffffff)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

I think I have done nothing. I also tried wsl.exe --shutdown and then start wsl with wsl.exe -d Ubuntu and it report:

C:\Users\zlx>wsl -d Ubuntu
<3>WSL (14) ERROR: CreateProcessParseCommon:711: Failed to translate C:\Users\zlx
<3>WSL (14) ERROR: CreateProcessParseCommon:757: getpwuid(0) failed 0
<3>WSL (14) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\system32
<3>WSL (14) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows
<3>WSL (14) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\Wbem
<3>WSL (14) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\
<3>WSL (14) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\OpenSSH\
<3>WSL (14) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\zlx\AppData\Local\Microsoft\WindowsApps
<3>WSL (14) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\zlx\AppData\Local\Programs\Microsoft VS Code\bin
Processing fstab with mount -a failed.
Failed to mount C:\, see dmesg for more details.
Failed to mount D:\, see dmesg for more details.

<3>WSL (14) ERROR: CreateProcessEntryCommon:334: getpwuid(0) failed 0
<3>WSL (14) ERROR: CreateProcessEntryCommon:505: execvpe /bin/sh failed 80
<3>WSL (14) ERROR: CreateProcessEntryCommon:508: Create process not expected to return

Expected Behavior

wsl starts successfully.

Actual Behavior

wsl cannot start up.

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@localvar
Copy link
Author

logs uploaded via feedback hub.

@OneBlue
Copy link
Collaborator

OneBlue commented Sep 12, 2024

@localvar: Based on the output it looks like your distribution might be corrupted. The pwuuid error suggests that /etc/passwd is not there or unreadable, and the execvpe error points to ELIBBAD. Unfortunately this might mean that you need to re-register your distribution from scrach.

You can try to recover your files via wsl --mount --vhd before re-registering, but when you're ready to restart the easiest would be to run: wsl --unregister ubuntu and then wsl --install ubuntu

@OneBlue OneBlue closed this as completed Sep 12, 2024
@localvar
Copy link
Author

Thanks @OneBlue , I will try what you suggested.

btw, do you think this related to exFAT? because I put the .vhdx file in an exFAT partition of the host machine and this is the 2nd time it suddenly cannot start in several months (but I have no idea about the error code of the 1st time now). I also run wsl on another computer for years, where I put the .vhdx file in an NTFS partition, and never met such an issue.

@OneBlue
Copy link
Collaborator

OneBlue commented Sep 12, 2024

Unless the disk got corrupted during the move, I'd say most likely not, but it doesn't hurt to try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants