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

Error reinstalling bash - Error 0x80070005 #473

Closed
darkraiden opened this issue Jun 4, 2016 · 22 comments
Closed

Error reinstalling bash - Error 0x80070005 #473

darkraiden opened this issue Jun 4, 2016 · 22 comments
Labels

Comments

@darkraiden
Copy link

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
Copy link

fpqc commented Jun 4, 2016

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

@darkraiden
Copy link
Author

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

@ddfznt
Copy link

ddfznt commented Jun 6, 2016

#410 (comment) maybe!
#453

@sunilmut
Copy link
Member

sunilmut commented Jun 6, 2016

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

@darkraiden
Copy link
Author

@sunilmut - I'm on the 14352 already!

@sunilmut
Copy link
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?

  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"

@darkraiden
Copy link
Author

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

@MrObvious
Copy link

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.

@sunilmut
Copy link
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.

@sunilmut sunilmut closed this as completed Jun 8, 2016
@benhillis
Copy link
Member

Reopening this until the fix hits the insider builds.

@benhillis benhillis reopened this Jun 8, 2016
@darkraiden
Copy link
Author

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

@benhillis
Copy link
Member

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?

@darkraiden
Copy link
Author

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

@benhillis
Copy link
Member

@davidedimauro88 Thank you very much for confirming!

@NoFlames
Copy link

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"

@benhillis
Copy link
Member

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

@sunilmut
Copy link
Member

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.

@bubthegreat
Copy link

@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
Copy link

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
Copy link

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
Copy link

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

@tara-raj
Copy link

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

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

No branches or pull requests

14 participants