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 Linux Images fail to install #4487

Closed
rayzorben opened this issue Sep 10, 2019 · 9 comments
Closed

WSL Linux Images fail to install #4487

rayzorben opened this issue Sep 10, 2019 · 9 comments

Comments

@rayzorben
Copy link

rayzorben commented Sep 10, 2019

Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.

If you have a feature request, please post to the UserVoice.

If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.

Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to [email protected]. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".

Please fill out the below information:

  • Your Windows build number: 1903 18975.1000

  • What you're doing and what's happening: Virtual Machine Platform is enabled. So is Windows Subsytem for Linux. I am trying to download Ubuntu for WSL from Windows Store. I download it, and try to install it, but I get

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070005
Error: 0x80070005 Access is denied.

Press any key to continue...

If I try it again I get

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070040
Error: 0x80070040 The specified network name is no longer available.

Press any key to continue...

I have tried the following:

  1. Uninstalling/Reinstalling Ubuntu
  2. Debian
  3. Alpine WSL

All 3 still have the same issue.

I have also tried:

  1. sfc /scannow (reports no errors)
  2. dism /online /cleanup-image /restorehealth
  3. Restart LxssManager
  4. Right-click and installing as Administrator
  5. A full network reset of the Windows Operating System
  • What's wrong / what should be happening instead:

  • Strace of the failing command, if applicable: (If some_command is failing, then run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here).

  • For WSL launch issues, please collect detailed logs.
    logs.zip

See our contributing instructions for assistance.

@benhillis
Copy link
Member

From looking at the logs it looks like the root of the issue is an access denied error coming from trying to grant an ACL to the distro VHD. Could you take a look in the various Hyper-V logs in eventvwr to see if anything sticks out?

Applications and Services Logs -> Microsoft -> Windows -> Hyper-V*

@rayzorben
Copy link
Author

@benhillis I looked at all Hyper-V* logs, both Admin and Operational. They are all 'Information' or 'Verbose'. There are no Errors or Warnings. I repro'd the issue and took a look at the latest timestamps and nothing stands out as any type of issue.

I also tried turning off WSL and Virtual Machine Platform, rebooting, turning them back on, and rebooting.

@benhillis
Copy link
Member

Something strange is going on with permissions in your appdata directory. Can you think of anything specific to your setup around permissions in your apps?

Could you provide the output of this command (please redact your user name)?
powershell Get-Acl C:\Users\<username>\AppData\Local\Packages\<distro>\LocalState\ext4.vhd

Are you able to import distros to non-store locations?
curl.exe -L http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/alpine-minirootfs-3.10.2-x86_64.tar.gz | wsl --import alpine %USERPROFILE%\alpine - --version 2

@rayzorben
Copy link
Author

@benhillis

PS C:\Users\me> Get-Acl C:\Users\me\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState


    Directory: C:\Users\me\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc


Path       Owner          Access
----       -----          ------
LocalState COMP\me RAYSBEAST\rayb Allow  FullControl...

@benhillis
Copy link
Member

@rayzorben - There is no ext4.vhdx in that path?

@rayzorben
Copy link
Author

@benhillis

The directory is empty.

Looks like I can import distros to non-store locations

C:\temp\test>curl.exe -L http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/alpine-minirootfs-3.10.2-x86_64.tar.gz --output alpine.tar.gz | wsl --import alpine %USERPROFILE%\alpine - --version 2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2647k  100 2647k    0     0  2647k      0  0:00:01 --:--:--  0:00:01 11.8M

C:\temp\test>wsl -l
Windows Subsystem for Linux Distributions:
alpine (Default)

@benhillis
Copy link
Member

@rayzorben - Interesting... that's what I suspected. Can you think of any settings you have modified? Perhaps installing store apps to non-system drive?

@rayzorben
Copy link
Author

@benhillis Well you pointed me the right direction.

I started investigating and I found a JUNCTION in c:\users\me\AppData\Local called "Application Data" that pointed to -> c:\users\me\AppData\Local

I'm not sure if that was the issue, but I removed that junction, and then I did icacls c:\users\me\AppData /q /c /t /reset

After doing that, Ubuntu starts fine and asked me for a username/pass and gave me a shell!

@noctarius
Copy link

Had the same issue after uninstalling Ubuntu (since it didn't start anymore) and wanted to reinstall. Deleting the distro directory (which had some left-overs) and retrying to install worked too.

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

3 participants