WSL: Cannot install bash. Hangs at "Extracting Filesystem"

I am attempting to install bash for windows using the standard process:

  1. enable developer mode
  2. go to “turn windows features on and off” and enable linux subsystem
  3. reboot
  4. execute bash in a command prompt run as Administrator.

At this point, I get through downloading from the store to Extracting filesystem, this will take a few minutes, but then the installer hangs and never continues.

I have looked in C:\Users[username]\AppData\Local\lxss and the files have downloaded and extracted, and the tarball has been removed, but the command never terminates and bash never appears in the start menu. If I open a new command prompt and execute bash, I get no output, and the command prompt doesn’t respond to ^C.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 40 (8 by maintainers)

Most upvoted comments

I just noticed that there’s a problem with the scrolling in the Bash environment.

Basically, it doesn’t hang when Extracting filesystem all you need to do is maximize the window. This even occured once when using apt-get and I thought it got stuck. But simply maximize the window and it shows everything working fine.

Hope that helps 😃

Nope it is definitely not the case as even when the install process is hang with extracting filesystem you can already using a second cmd window to open a bash (dropped in as root) and doing apt-get update.

I resolved my issue thusly:

On running bash and running “ps auxf”, I saw that “apt update” was running. I’m behind an NTLM based proxy and this was trying to talk out directly to the internet. Upon killing the “apt update” process (kill -9 <PID>), the installer continued and asked for the new user.

Once up and running, I had CNTLM installed under Windows, so I created /etc/apt/apt.conf file and added the following lines:

Acquire::http::proxy "http://localhost:3128/";
Acquire::ftp::proxy "ftp://localhost:3128/";
Acquire::https::proxy "https://localhost:3128/";

I also edited /etc/environment and added the following lines:

ftp_proxy="ftp://localhost:3128"
http_proxy="http://localhost:3128"
https_proxy="https://localhost:3128"
no_proxy="localhost,127.0.0.1,10.*"

Close bash and reopen it, and then I could run “sudo apt-get update” and “sudo apt-get dist-upgrade” to manually finish the update that the installer couldn’t do.

@aseering I clearly said that the reason why firewall should not be the reason is because on the second cmd window apt update everything works. Please don’t just pick up the “definitely …” sentence alone as I believe it is a 100% fact backed conclusion. “something is not implemented reliably” is just a neutral sentence if this cannot be accepted I don’t know what to say … what’s the problem for a beta thing not working reliably? this is normal, and everyone should know it. Don’t take everything the negative way.

I was trying to find a log to send to the forum but cannot find any. maybe thinking of a logging utility for user to provide more precise info?

To update the scenario:

  • One cmd window with bash haning at extracting file system
  • second cmd window run bash and dropped in super user mode, apt update works.
  • exit bash on second cmd window, run lxrun /setdefaultuser and finish the setup, it immediately triggers the first cmd window to begin the user adding process.

I hope I am crystal clear this time. This might not be issue for other people so please let me know what other information you might need that could cause the issue I described. By the way I have been using ubuntu since its born and I will immediately spot two apt update cannot run at the same time because it will tell you clearly so with text on the screen.

Avast you have to uninstall according to the other people.

@yanghao There is no need to be disrespectful, I’m simply trying to help you understand what’s likely happening.

@TheTomahawk - The issue you had seems to be a duplicate of #1570?

I had the same hanging issue. But when I opened the window to its full size, I saw it was waiting for me to input a username

@yanghao – I think @benhillis did read through your post and answer to the best of his knowledge. Based on my own knowledge, and having read his post, I agree with his assessment. Given that he and a number of other people on this forum who all know their stuff are telling you that they understand what you are saying and that he is correct, I would encourage you to think a bit about how that might be the case.

We could all be wrong. But if we’re wrong, we’re probably all wrong for the same reason, and that reason is probably technical because technical stuff is the only common thread between this particular set of folks on this forum. So if we’re wrong, you should figure out what technical detail we’re missing and point it out.

Your own posts are, if I may be be frank, relatively low information content and in some ways not too productive. To be specific: You make broad statements (“it looks very clear to me that something is not implemented so reliably”, “Nope it is definitely not the case”, etc) that are also negative. There’s nothing inherently wrong with that, if they’re true and if they serve a purpose. But for the most part you don’t then back them up with information (data, examples, or other supporting or explanatory evidence). As a result, you’re telling engineers who care about their work that these very broad things are true about their work, but your statements are so general that they can’t go figure out why they are true. So they can’t really do anything about it. And because they’re negative, the impact is that they feel like something is wrong and they can’t do anything about it. Which sucks for them and which doesn’t help you either.

If you want to add information content to your posts, the general approach is to just think a little harder and elaborate a little more with your posts. Specifically, you might consider some of the following:

  • “To all … something is not implemented so reliably” – First, this is a forum; everything is addressed to all unless you specifically address it to someone else. So that part was redundant. For indicating that something is not implemented so reliably – I mean, I challenge you to find a piece of substantial consumer software that is not broken in some environment; I claim it can’t be done, everything’s broken somewhere. The data that you’ve provided is that it happens for two of your computers; a correct statement given that data is that it is unreliable for you. Given that many more than two people have not hit this issue, as evidenced by the number of forum posts about other issues by people who have gotten through the setup process successfully (prior to / without your workaround), the first question I would therefore ask is, what’s special about you / your setup? So you could provide more detail about your setup. Or, alternatively, you could reference other posts on this or other forums that show people hitting this issue in order to demonstrate that it’s not just you and that the problem is broader than it looks here.
  • “Nope, it is definitely not the case”: You’re saying that someone’s technical guess is not describing the situation. If you say that, you should say why you’ve found that they’re wrong, so that they can update their guess. I think that’s what you’re trying to do by noting that you can open up a separate window and run “apt-get update”, implying that you couldn’t run “apt-get update” yourself if it were already running? If so, you should close the loop for us by saying something like “if I open up two terminal windows at once and run “apt-get update” in both, the second one gets blocked by the first; so I know it’s not allowed to run two 'apt-get update’s at once.” I imagine that seems so obvious to you that it would be a total waste to say it. But you should try it and you should say it, because the response would be “actually, you are supposed to be able to run two “apt-get update”'s at once; it’s “apt-get upgrade” that’s supposed to block. If you’re seeing “apt-get update” block in your test, that’s a separate bug. Could you post more details?”

@benhillis No offence … I removed the disrespectful word. but looks like you did not even read through my posting of what is going wrong. All information is in my first post and I cannot agree with your point.

@aychang95 Nope, it is not the same case, I disabled quick edit mode of the cmd window, and no matter how I maximize/minimize the window the text does not come out for setting up a user. It only shows after a second lxrun /setdefaultuser.

@zadjii-msft Sorry for the late reply, but I do not remember if I was in select mode specifically. I may have possibly clicked on the cmd. I remember just seeing it hang and then coming to this thread and reading about maximizing the cmd to fix it. However, the moment I maximized the cmd, the installation was done. So I am assuming everything after “Extracting Filesystem…” was running, just not showing up (due to select I assume). I guess this would mean that select mode only prevents text output to the cmd, but continues to extract/install.

I could try to uninstall and reinstall bash to replicate the problem?

@yanghao If you were able to run bash successfully in a second cmd, I am very sure your problem was with the cmd just not displaying the text that the extraction was complete. @Revenexant solution above would have shown you that everything was extracted successfully. I understand the unfortunate design of this unintended bug; however, to blow a problem like this out of proportion while introducing contrived issues with little backing in a disrespectful manner will only impede on how these microsoft employees will do their work to help us out.

@yanghao The hang you are experiencing is likely related to your firewall blocking network traffic.

@Revenexant @aychang95 is there any chance you clicked on the window at any point during the installation, as if to select text? An often overlooked feature of conhost is that it pauses output while you have text selected. You can tell that you’re in this select mode, because “Select” will get prepended to the title of the window. Maximizing the window would dismiss this mode, as well as hitting escape while in select mode.

Yes uninstalling the Avast worked. Thank you all 👍