# Microsoft/WSL

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.

# Error reinstalling bash - Error 0x80070005 #473

Closed
opened this Issue Jun 4, 2016 · 22 comments

Projects
None yet

### darkraiden commented Jun 4, 2016

 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!

### fpqc commented Jun 4, 2016

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

### darkraiden commented Jun 6, 2016

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

### ddfznt commented Jun 6, 2016

 #410 (comment) maybe! #453
Member

### sunilmut commented Jun 6, 2016

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

### darkraiden commented Jun 7, 2016

 @sunilmut - I'm on the 14352 already!
Member

### sunilmut commented Jun 7, 2016

 @davidedimauro88 - Sorry to hear that it is still not working for you. Can you try these steps and see if that helps? 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"
Author

### darkraiden commented Jun 8, 2016

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

### MrObvious commented Jun 8, 2016

 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.
Member

### sunilmut commented Jun 8, 2016

 @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.

Member

### benhillis commented Jun 8, 2016

 Reopening this until the fix hits the insider builds.

Author

### darkraiden commented Jun 10, 2016

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

Member

### benhillis commented Jul 8, 2016

 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?
Author

### darkraiden commented Jul 8, 2016

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

Member

### benhillis commented Jul 8, 2016

 @davidedimauro88 Thank you very much for confirming!

Closed

Closed

Closed

### NoFlames commented Jan 11, 2017

 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"
Member

### benhillis commented Jan 11, 2017

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

### sunilmut commented Jan 11, 2017

 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.

Closed

Closed

Closed

### bubthegreat commented Aug 26, 2017

 @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.

### lornova commented Aug 26, 2017

 @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)

### dregula commented Sep 29, 2017

 @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.

### claudiordgz commented Oct 17, 2017

 @lornova had the same issue after updating and rebooting Windows (I don't think updating had anything to do with it). After doing @sunilmut procedure (which was very hard due to a lot of files having excessive path names) and extra cleaning %localappdata%\lxss I was able to reinstall using bash.exe. Last week before rebooting I used VSCode to edit some files on lxss which eventually broke access from Ubuntu, it looks like I broke the filesystem. From now on I won't edit lxss files from Windows.

Closed

Member

### tara-raj commented May 22, 2018

 Closing this issue as it is stale. If you come across this again we will re-open and repro.

### tara-raj closed this May 22, 2018

to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.