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

Cannot install bash. Hangs at "Extracting Filesystem" #772

Closed
ewortzman opened this issue Aug 4, 2016 · 40 comments
Closed

Cannot install bash. Hangs at "Extracting Filesystem" #772

ewortzman opened this issue Aug 4, 2016 · 40 comments

Comments

@ewortzman
Copy link

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.

@Leigh-ma7
Copy link

make sure your were not using VM(windows 10) , seems WSM all networking/socket are still under feature road map.

I have the similar slowness downloading, but when i made sure no other laptop/devices occupy the bandwidth , then it completed downloading eventually.

the only difference, i only used my own account instead of run as Administrator for your step 4

@ewortzman
Copy link
Author

ewortzman commented Aug 5, 2016

I'm not running any VMs. I'm connected to WiFi and the only other network adapter is the ethernet jack. Any it finishes downloading no problem. It's after the download that it hangs.

@Leigh-ma7
Copy link

i am using the WiFi as well, no issues. but it was quite slow to be honest for the first time installation. after that the apt-get update all went smoothly.

could be your Anniversary update not 100% update completed ? i cross checked the " system update " couple of times , before i go for the WSL. also i installed Hyper V and container services from "turn windows features on and off". but don't see it relevant.

@ewortzman
Copy link
Author

just checked. it says my system is up to date. I can't even get to bash to run apt-get. it hangs long before that.

@Leigh-ma7
Copy link

Leigh-ma7 commented Aug 5, 2016

check this one , seems someone has it in Dell XPS15 and used powershell instead.

Read more at https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/#qeXlTU7jmwom8Kcp.99

same issue on my XPS15, it seems there’s error after extracting file system.
How to fix it?

4 months ago
LOG IN TO REPLY
image: https://secure.gravatar.com/avatar/d9a6e224d33bbc8024b056054b7f1806?s=40&d=mm&r=g

**Scott Parks

**Same with an XPS 13 –

  1. open a command prompt
  2. go to Properties
  3. Go to Options
  4. Uncheck : Use legacy console
    Restart Power Shell and type bash
    This resolved it for me.****

@ewortzman
Copy link
Author

Use legacy console is not checked

@Leigh-ma7
Copy link

ok. hope others if have similar issue could help. i didn't use power shell . i only search bash and use CMD the basic way.

@ewortzman
Copy link
Author

lets hope. thanks for the help

@fpqc
Copy link

fpqc commented Aug 5, 2016

Are you running kaspersky or avast? Both are causing big problems at the moment.

@ewortzman
Copy link
Author

I am running Avast. just disabled it. will update if it works...

@fpqc
Copy link

fpqc commented Aug 5, 2016

Avast you have to uninstall according to the other people.

@ewortzman
Copy link
Author

can I reinstall it after installing bash? or am i gonna have to find a new antivirus?

@fpqc
Copy link

fpqc commented Aug 5, 2016

Uninstall it until avast fixes the problem. Win10 has an antivirus built in fwiw

@fpqc
Copy link

fpqc commented Aug 5, 2016

Hey ewortzman, could you close this issue now? Thanks.

@ewortzman
Copy link
Author

ewortzman commented Aug 5, 2016

I was running the installer again to see if it fixed it. It hasn't. The installer is still hanging, so I will leave it open.

EDIT: After rebooting and trying again, it worked now. Thanks for the help!

@ss005
Copy link

ss005 commented Aug 5, 2016

Yes uninstalling the Avast worked.
Thank you all 👍

@kevyworks
Copy link

I can also confirm to this, Uninstalling Avast works for me too.

@pratham2003
Copy link

Why uninstall Avast? just disable the shields temporarily.

@ewortzman
Copy link
Author

Tried that. It didn't work. Not even completely killing the process worked. Once I uninstalled Avast and rebooted I had no problem.

@mryarbles
Copy link

mryarbles commented Aug 16, 2016

I'm not sure why this was closed. I've been having this issue for weeks - going back to it on occasion.
The last thing that fixed it for me was turning off virtual memory on all drives but the C: drive.
I rebooted for the 100th time, ran lxrun /uninstall /full /y. After that completed I tried lxrun /install /y and it finally completed. Turning off windows defender did not help the issue.

By the way to turn off VM:

  1. right click start button
  2. Choose System
  3. Select "Advanced System Settings"
  4. Hit Advanced tab
  5. Hit Performance Tab
  6. Hit Advanced tab again
  7. Click "Change" under virtual memory
  8. Switch all additional drives to "No paging file"
  9. Reboot
  10. Cross fingers.

@suhridh
Copy link

suhridh commented Sep 3, 2016

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

@aychang95
Copy link

@Revenexant that worked for me! I just maximized it and realized it wasn't hanging, it just wasn't showing the text after "Extracting file systems..." lameee.
Thanks!

@sunilmut
Copy link
Member

@Revenexant Thanks for reporting the issue. @bitcrazed, @miniksa and @zadjii-msft for the scrolling/display issue.

@zadjii-msft
Copy link
Member

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

@yanghao
Copy link

yanghao commented Oct 25, 2016

To all who might have problem and all above suggestions doesn't really fix your issue, it looks very clear to me there is something not implemented so reliably and I had two windows 10 one is reaching the user set up and one is not reaching it (hanging around extracting filesystem forever).

The way I got it fixed is very easy: open a second cmd window and type lxrun /setdefaultuser
and then setup a dummy user. Once you typed in the password and the setdefaultuser procedure is finished you go back to the install window and voila, the install process now ask you to setup a new user.

Hope this could also give the MS team a hint on what might be going wrong.

@benhillis
Copy link
Member

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

@yanghao
Copy link

yanghao commented Oct 25, 2016

@benhillis why do you think so? downloading everything works fine. and you think there is some network traffic between extracting filesystem and setting up a user? and even a second lxrun /setdefaultuser would fix a firewall issue? I don't think so.

@benhillis
Copy link
Member

Downloading is done from an NT process, not a WSL process so the firewall does not block the traffic. What does happens before setting up the default user is a WSL process (apt) tries to update the apt package index. I suspect that is what is blocked.

@yanghao
Copy link

yanghao commented Oct 25, 2016

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.

@benhillis
Copy link
Member

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

@aychang95
Copy link

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

yanghao commented Oct 26, 2016

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

@aseering
Copy link
Contributor

@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?"

@yanghao
Copy link

yanghao commented Oct 26, 2016

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

@nielu
Copy link

nielu commented Dec 2, 2016

I can confirm that @yanghao solution works. While stuck at extracting file system i've opened another cmd window and run lxrun /setdefaultuser. Immediately after setting up an temp user account, first console window unhanged and asked me to set up another user.

@rodentgeek
Copy link

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

@TheTomahawk
Copy link

TheTomahawk commented Jan 17, 2017

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.

@sunilmut
Copy link
Member

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

@TheTomahawk
Copy link

It appears so. However, in my searching for the problem I was having, I didn't find that issue. This was the first article in my search results. Even when I searched for the term with 'proxy', it didn't come back. So it's likely that others are having the same issue without realising that they are, hence my reply above.

@sunilmut
Copy link
Member

@TheTomahawk - Please feel free to chime in at #1570. This issue is closed and may not get much attention.

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

No branches or pull requests