WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Error reinstalling bash - Error 0x80070005

Open darkraiden opened this issue 10 years ago • 22 comments

Hi guys,

I've been trying bash for a couple of weeks and I literally 'Messed around' with it to test my full Linux stack and whether it could work with my workflow or not.

I've got to the point, though, when I broke too many things therefore I decided to reinstall it from scratch. lxrun /uninstall worked as expected but when I now run lxrun /install, this is the output I get

C:\WINDOWS\system32>LxRun.exe /install
-- Beta feature --
This will install Ubuntu on Windows, distributed by Canonical
and licensed under its terms available here:
https://aka.ms/uowterms

Type "y" to continue: y
Error: 0x80070005

Also tried to do the same thing opening bash directly but when I type y the bash window disappear!

Thanks in advance and congrats for the amazing job you're doing!

darkraiden avatar Jun 04 '16 06:06 darkraiden

Try lxrun /uninstall /full /y and try installing via bash.exe?

fpqc avatar Jun 04 '16 16:06 fpqc

Hi @fpqc, tried it already! No joy :(

darkraiden avatar Jun 06 '16 09:06 darkraiden

https://github.com/Microsoft/BashOnWindows/issues/410#issuecomment-221463487 maybe! https://github.com/Microsoft/BashOnWindows/issues/453

ddfznt avatar Jun 06 '16 16:06 ddfznt

@davidedimauro88 - Which Windows build are you on? Can you try this with Windows build 14352?

sunilmut avatar Jun 06 '16 22:06 sunilmut

@sunilmut - I'm on the 14352 already!

darkraiden avatar Jun 07 '16 17:06 darkraiden

@davidedimauro88 - Sorry to hear that it is still not working for you. Can you try these steps and see if that helps?

  1. lxrun /uninstall /full /y
  2. Reboot
  3. Open an admin prompt or through explorer, delete all the content under the %localappdata%\lxss directory.
  4. Install using bash.exe or "LxRun.exe /install"

sunilmut avatar Jun 07 '16 21:06 sunilmut

Hi @sunilmut - it worked!!! Awesome, thanks so much!

darkraiden avatar Jun 08 '16 08:06 darkraiden

C:\Users\pstejska\AppData\Local\lxss\home\pstejska\android>rmdir /s /q . .\external\chromium_org\third_party\jsoncpp\overrides\src - The directory is not empty. .\external\chromium_org\third_party\skia\gm\rebaseline_server\testdata\outputs\expected\compare_rendered_pictures_test.CompareRenderedPicturesTest.test_endToEnd_withImageBaseGSUrl\compare_rendered_pictures.json - The file name is too long. .\external\chromium_org\third_party\webrtc\modules\audio_processing\aecm - The directory is not empty. .\external\chromium_org\v8\third_party - The directory is not empty. .\external\clang\test\Driver\Inputs\basic_linux_libcxx_tree\usr\include\c++ - The directory is not empty. .\external\clang\test\Driver\Inputs\fedora_18_tree\usr\lib\gcc - The directory is not empty. .\external\clang\test\Driver\Inputs\mips_cs_tree\lib\gcc\mips-linux-gnu\4.6.3\include-fixed\mips16\soft-float - The directory is not empty. .\external\clang\test\Driver\Inputs\mips_fsf_tree\mips-mti-linux-gnu\lib\mips64\fp64 - The directory is not empty. .\external\clang\test\Driver\Inputs\mips_fsf_tree\sysroot\mips32\el\fp64\usr - The directory is not empty. .\external\clang\test\Driver\Inputs\ubuntu_13.04_multiarch_tree\usr\include\x86_64-linux-gnu\c++\4.7 - The directory is not empty. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.pde.api.tools.ee.cdcfoundation10_1.0.0.200901281111\org\eclipse\pde\api\tools\internal\api_stubs\CDC-1.0_Foundation-1.0.zip - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.pde.api.tools.ee.cdcfoundation11_1.0.0.200901281111\org\eclipse\pde\api\tools\internal\api_stubs\CDC-1.1_Foundation-1.1.zip - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.pde.api.tools.ee.javase16_1.0.0.200901281111\org\eclipse\pde\api\tools\internal\api_stubs\JavaSE-1.6.zip - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.pde.api.tools.ee.osgiminimum10_1.0.0.200901281111\org\eclipse\pde\api\tools\internal\api_stubs\OSGi_Minimum-1.0.zip - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.pde.api.tools.ee.osgiminimum11_1.0.0.200901281111\org\eclipse\pde\api\tools\internal\api_stubs\OSGi_Minimum-1.1.zip - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.pde.api.tools.ee.osgiminimum12_1.0.1.200904031014\org\eclipse\pde\api\tools\internal\api_stubs\OSGi_Minimum-1.2.zip - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.pde.build_3.6.1.R36x_v20100823\data - The directory is not empty. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\model\BuildResultsProperties.java - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\model\ComponentResultsElement.java - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\model\ConfigResultsElement.java - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\model\PerformanceResultsElement.java - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\model\ScenarioResultsElement.java - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\ui\PerformanceResultsPerspective.java - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\ui\PerformanceResultsPreferenceInitializer.java - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\ui\PerformanceResultsPreferencePage.java - The file name is too long. .\external\eclipse-basebuilder\basebuilder-3.6.2\org.eclipse.releng.basebuilder\plugins\org.eclipse.test.performance.ui\src\org\eclipse\test\internal\performance\results\utils\IPerformancesConstants.java - The file name is too long. .\external\google\market_licensing\sample\src\com\example\android - The directory is not empty. .\external\libunwind\aux - The system cannot find the file specified. .\external\linux-tools-perf\perf-3.12.0\arch\hexagon\include\uapi - The directory is not empty. .\external\okhttp\android\test - The directory is not empty. .\external\square\dagger\compiler\src\it\default-package-injected-type\src\main - The directory is not empty. .\external\square\dagger\compiler\src\it\inject-parameterized-type\src - The directory is not empty.

This seems to be why. The %appdata%\home\username\android\external has this problem.

MrObvious avatar Jun 08 '16 19:06 MrObvious

@davidedimauro88 - Good to know that your issue is resolved. We had a bug in WSL that was leaking handles to directory. During bash instance start, we would try to delete these directories and that would fail (because of leaked handles) and cause the instance to not start. This has been fixed in our dev branch and should hit the release branch soon.

sunilmut avatar Jun 08 '16 19:06 sunilmut

Reopening this until the fix hits the insider builds.

benhillis avatar Jun 08 '16 20:06 benhillis

@sunilmut thanks for the update and the help! will be waiting for the new build then. Thanks again

darkraiden avatar Jun 10 '16 08:06 darkraiden

This should be fixed in Build 14371 and probably even earlier than that. If possible @davidedimauro88 could you let us know if this is resolved for you?

benhillis avatar Jul 08 '16 15:07 benhillis

Hey @benhillis, I just tried to replicate the issue again and it seems to be fixed now. Thanks a lot!

darkraiden avatar Jul 08 '16 19:07 darkraiden

@davidedimauro88 Thank you very much for confirming!

benhillis avatar Jul 08 '16 19:07 benhillis

This error happened to me after the latest update on the release branch OS Build 14393.693 The instructions provided by @sunilmut fixed it, but requires losing all of the data which is not acceptable solution for most people: lxrun /uninstall /full /y Reboot Open an admin prompt or through explorer, delete all the content under the %localappdata%\lxss directory. Install using bash.exe or "LxRun.exe /install"

NoFlames avatar Jan 11 '17 19:01 NoFlames

@NoFlames - You should also just be able to remove %localappdata%\lxss\temp

benhillis avatar Jan 11 '17 19:01 benhillis

I am reopening this issue. Before using the workaround, please collect traces as we would like to get to the bottom of this issue. Agreed with @NoFlames that lostig user data is not an acceptable solution.

sunilmut avatar Jan 11 '17 20:01 sunilmut

@sunilmut - If it helps, this started happening to me after I modified the file permissions so I could see hidden files. After I reverted that change, the issue no longer existed - so it may be an issue with windows modifying file attributes in a way that the bash shell doesn't like.

bubthegreat avatar Aug 26 '17 09:08 bubthegreat

@sunilmut unfortunately this procedure doesn't work on my system, still getting error 0x80070005

It worked well until yesterday, I don't know what has changed...

My build is 15063.540 (Windows 10 1703)

lornova avatar Aug 26 '17 12:08 lornova

@lornova Had the same problem after I made the mistake of trying to access WSL files from Windows-Explorer. There were a bunch of stubborn temporary files under %appdata%\lxss\temp; often several sundirectories deep. After manually deleting these from an elevated-CMD window, I was able to completely delete %appdata%\lxss. After that, running Bash.exe worked fine.

dregula avatar Sep 29 '17 22:09 dregula