bash.exe hangs, after it is not possible to reinstall using lxrun.exe
First of all, I would like to express big thank you to all people that made possible to have WSL and bash in win10. I use it daily for work and school. Great tool, love it.
The issue
History
Upcoming days to the state I am reporting I noticed minor weird behaving of bash.
I usually use tmux, and as I have been working, bash became unresponsive(Blinking cursor, no reaction to whatever keys including CTRL+C/Z/D.)
Exiting bash with X button is executed immediately, after new terminal is spawned bash is unresponsive too, only workaround for this was system reboot.
Upcoming to current state
Today after update I decided to solve this problem by clean installation of WSL, as bash freeze became almost instant(~5-10sec).
I did not update bash for a while, thought that was a problem, after clean restart, I started bash, typed
sudo apt-get update && sudo apt-get upgrade and to my surprise cmd froze in the middle of updating apt repos.
I fire up powershell.exe and tab complete cmd
LxRun.exe /uninstall, execute, gets prompted for y, after a while I get error:
Error: 0x80070091, weird.
Current state
I tried as administrator executing the same command, response: The LX subsystem has an install or uninstall operation pending.
Also tried to uninstall with /full /y flags to no avail.
After that I tried stop lxssmanager with:
sc stop lxssmanager and repeat attempts to uninstall WSL: unsuccessful again with same error, operation pending.
Executing bash.exe result is:
-- 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: 0x80070091
After this and quick search on the internet, I ended up here, reporting it.
-
Your Windows build number: Microsoft Windows [Version 10.0.16179]
-
What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots): Described above
-
What's wrong / what should be happening instead: Uninstallation of WSL does not work/uninstallation completes
-
Strace of the failing command, if applicable: Not applicable, I think. If I am wrong please tell me/direct me how and I'll post result.
Can anyone point me in the direction towards solving this problem?
https://github.com/Microsoft/BashOnWindows/issues/1902#issuecomment-293957966 and #1862
Thanks for help, it worked, for future reference:
I have another partition which was old system partition from win7 times. Diskpart provided this output
Microsoft DiskPart version 10.0.16179.1000
DISKPART> list volume
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 F DVD-ROM 0 B No Media
Volume 1 System Rese NTFS Partition 500 MB Healthy System
Volume 2 C NTFS Partition 111 GB Healthy Boot
Volume 3 D NTFS Partition 97 GB Healthy
Volume 4 E NTFS Partition 723 GB Healthy
Volume 5 FAT32 Partition 100 MB Healthy Hidden
DISKPART>
So as I followed #1862, I executed with admin rights this command:
icacls D: /grant SYSTEM:(OI)(CI)F (Note: run in cmd.exe, not powershell),
After that LxRun.exe /uninstall still returned operation pending,
however running bash.exe started installation which downloaded WSL from Windows Store.
To be sure I repeated process of reinstallation with flags /full /y. All executed successfully.