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

Can't launch Arch in WSL. (/bin/sh not found, failed to mount C:\) #12237

Closed
1 of 2 tasks
dquevid opened this issue Nov 4, 2024 · 4 comments
Closed
1 of 2 tasks

Can't launch Arch in WSL. (/bin/sh not found, failed to mount C:\) #12237

dquevid opened this issue Nov 4, 2024 · 4 comments

Comments

@dquevid
Copy link

dquevid commented Nov 4, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.4317]

WSL Version

2.3.24.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Arch 2024.11.01-x86_64

Other Software

No response

Repro Steps

  1. Download Arch bootstrap tarball from official sources.
  2. Extract with bsdtar (specify compressing algorithm if the tarball is compressed) then archive to a simple tarball again using GNU tar.
  3. Import bootstrap into WSL.
wsl.exe --import Arch $env:USERPROFILE\Documents\Arch arch-bootstrap.tar
  1. Launch wsl distro.
wsl.exe -d Arch

Expected Behavior

Bash execution in root environment.

Actual Behavior

<3>WSL (9) ERROR: CreateProcessParseCommon:763: Failed to translate C:\Users\david
<3>WSL (9) ERROR: CreateProcessParseCommon:809: getpwuid(0) failed 2
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows\system32
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows\System32\Wbem
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0\
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Windows\System32\OpenSSH\
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Program Files\Git\cmd
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\david\AppData\Local\Microsoft\WindowsApps
<3>WSL (9) ERROR: UtilTranslatePathList:2852: Failed to translate C:\Users\david\AppData\Local\Programs\Microsoft VS Code\bin
Processing fstab with mount -a failed.
Failed to mount C:\, see dmesg for more details.

<3>WSL (9) ERROR: CreateProcessCommon:392: getpwuid(0) failed 2
<3>WSL (9) ERROR: CreateProcessCommon:559: execvpe(/bin/sh) failed: No such file or directory

Screenshot of error messages

Diagnostic Logs

WslLogs-2024-11-04_14-35-24.zip
wmic_output.txt

@dquevid
Copy link
Author

dquevid commented Nov 4, 2024

Debian launches without any problems. The problem is only with Arch.

Copy link

github-actions bot commented Nov 4, 2024

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!

Closed similar issues:

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

Diagnostic information
Detected appx version: 2.3.24.0

@dquevid
Copy link
Author

dquevid commented Nov 4, 2024

In my previous issue Can't boot Arch. Failed to translate Windows env variables and failed to mount disk partitions (#11567) the problem was solved using wsl.conf. However, now it is not the case it seems.

@dquevid
Copy link
Author

dquevid commented Nov 4, 2024

Nevermind, i fixed the issue. I just injected wsl.conf file into the bootstrap while rearchiving it, and it just worked, even though it didn't for multiple times.

For those wondering, here are the steps i follow to prepare the bootstrap (you will need at least Debian/Ubuntu installed to do this):

Image
Image
Image

@dquevid dquevid closed this as completed Nov 4, 2024
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

1 participant