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

Catastophic failure when I try to install WSL2 #9420

Closed
1 of 2 tasks
veritiegroup opened this issue Jan 1, 2023 · 26 comments
Closed
1 of 2 tasks

Catastophic failure when I try to install WSL2 #9420

veritiegroup opened this issue Jan 1, 2023 · 26 comments

Comments

@veritiegroup
Copy link

veritiegroup commented Jan 1, 2023

Version

Microsoft Windows [Version 10.0.19045.2364]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

I'm logged in to Windows with my work email that doesn't have Admin rights, but I have a local admin account which I can run admin tasks with. If I run PowerShell as as Administrator and run

wsl --install

Expected Behavior

It should install WSL2

Actual Behavior

It gives the output:

PS C:\Windows\system32> wsl --install
Installing: Windows Subsystem for Linux
Catastrophic failure

If I install Ubuntu from the Store, it will install Ubuntu with a WSL1 kernel, although

wsl -l -v

doesn't recognise that any distros are installed.

I have tried every combination I can think of uninstalling and reinstalling various components, I can't seem to get WSL2 to work,

Diagnostic Logs

WslLogs-2023-01-01_23-12-01.zip

@veritiegroup veritiegroup changed the title Catastophic failure when I try to install WSL Catastophic failure when I try to install WSL2 Jan 1, 2023
@veritiegroup
Copy link
Author

I realised the issue with me was a permission issue. It was because I was running PowerShell as a different user. I had to make my current logged in user an Admin and run it with that user. This solved the problem for me

@gspencer90
Copy link

I realised the issue with me was a permission issue. It was because I was running PowerShell as a different user. I had to make my current logged in user an Admin and run it with that user. This solved the problem for me

This worked for me as well - I would get this error on my non-admin user account even when running PowerShell as administrator.

Fix: logged into the administrator account for my personal machine directly and was able to successfully wsl --update as well as successfully install distributions that I couldn't before (got error 0x8000ffff).

@tareynoso
Copy link

I realised the issue with me was a permission issue. It was because I was running PowerShell as a different user. I had to make my current logged in user an Admin and run it with that user. This solved the problem for me

Thank you so much. I started a windows powershell with my normal user, not my admin user and it works

@Fiewor
Copy link

Fiewor commented May 25, 2023

I realised the issue with me was a permission issue. It was because I was running PowerShell as a different user. I had to make my current logged in user an Admin and run it with that user. This solved the problem for me

I'm facing this same issue using an organization's PC where I can't be made an admin. Is there any workaround for this?

@dmurvihill
Copy link

I just encountered this as well, the problem for me was no network connection (obviously you need a connection to install updates 🤦‍♂️)

@sebastianangermund
Copy link

I have the same issue. In Powershell both as admin and normal user. And I have a working network connection. Any ideas?

@paiam-de
Copy link

paiam-de commented Jul 3, 2023

hey did you fix that? i do have you problem to.

@sebastianangermund
Copy link

@paiam-de this thread helped me #8662, especially running netsh winsock reset and rebooting. hope it helps you too

@ElectricRCAircraftGuy
Copy link

ElectricRCAircraftGuy commented Aug 9, 2023

Tested on Windows 10 Pro.

Update...clearer instructions in my new comment here:
actually...you must run netsh winsock reset first, as admin, as @sebastianangermund says. Only then do my instructions below apply.


I'm logged in to Windows with my work email [a domain user account] that doesn't have Admin rights, but I have a local admin account which I can run admin tasks with.

Same here. The solution for me was to not run the cmd prompt as an admin. Then, when I run the following commands, a window will pop up at some point which asks for my admin username and password. At that point, I use my local admin account, and it works just fine.

Again, do not run cmd prompt as an admin. Run it as a normal user:

# Update your WSL system
wsl --update

# Install the latest version of Ubuntu
wsl --install

If you get the Catastrophic failure error, you probably mistakenly ran the command prompt or power shell as a local admin.

@thehairy
Copy link

thehairy commented Sep 5, 2023

If you get the Catastrophic failure error, you probably mistakenly ran the command prompt or power shell as a local admin.

Thats unfortnuately not the case.
Ran it as a normal user and after running the installation it asked for admin credentials -> Critical failure

@ElectricRCAircraftGuy
Copy link

ElectricRCAircraftGuy commented Sep 5, 2023

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install

This is the shorter and clearer version of what's already in my comment you quoted.

Does this work for you?

@rboyagoda
Copy link

This

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install

This is the shorter and clearer version of what's already in my comment you quoted.

Does this work for you?

This solution worked for me. Followed the step exactly!! thank you very much

@I-am-vishalmaurya
Copy link

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install

This is the shorter and clearer version of what's already in my comment you quoted.

Does this work for you?

This worked for me, thanks a lot was stuck on this for a whole day

@mailinglists35
Copy link

mailinglists35 commented Nov 11, 2023

after the catastrophic failure (it did show first a progress bar that went from 0% to 100%), running again wsl --update it shows me messages in Czech. My windows language being English.

C:\Users\user>wsl.exe --update
Zjišťuje se dostupnost aktualizací.
Už máte nainstalovanou nejnovější verzi Subsystému Windows pro Linux.

Microsoft Windows [Version 10.0.19045.3570]
WSL1

C:\Users\user>wsl -l -v
  NAME              STATE           VERSION
* Ubuntu-20.04      Running         1
  Ubuntu-Preview    Stopped         1
  Ubuntu            Stopped         1
  Ubuntu-22.04      Stopped         1
C:\Users\user>wsl --status
Výchozí distribuce: Ubuntu-20.04
Výchozí verze: 2
WsL2 se s vaší aktuální konfigurací počítače nepodporuje.
Povolte prosím volitelnou komponentu Platforma virtuálního počítače a ujistěte se, že je v systému BIOS povolena virtualizace.
Informace najdete na https://aka.ms/enablevirtualization.

@adithya-s-sekhar
Copy link

I did the same thing got catastrophic thing but then in an administrative shell, unregistered ubuntu first with wsl --unregister ubuntu and then installed it again with wsl --install. Now it worked perfectly.

@pixelTotem
Copy link

pixelTotem commented Jan 27, 2024

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install

This is the shorter and clearer version of what's already in my comment you quoted.

Does this work for you?

This has worked, thanks.

@Brondahl
Copy link

@ElectricRCAircraftGuy could I confirm that the first operation after netsh winsock reset, is to update WSL ... even though I'm trying to install it for the first time (and the previous execution of the install command failed)

(This seems quite plausible given that the install command itself is wsl --install ... so clearly wsl.exe is in fact already present. I just want to be certain. 😅 )

@dbly
Copy link

dbly commented Feb 16, 2024

I ran into catastrophic failure error and solved as per https://stackoverflow.com/a/78004733/598353

@P-IVI-T
Copy link

P-IVI-T commented Mar 5, 2024

Tested on Windows 10 Pro.

@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install

This is the shorter and clearer version of what's already in my comment you quoted.

Does this work for you?

Worked for me perfectly! Thank you! You would think in a world where privileged access is becoming more controlled you would start out of the gate with admin privileges ... weird.

Anyhoo, you saved me on this one :)

@guoran23
Copy link

Tested on Windows 10 Pro.
@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install

This is the shorter and clearer version of what's already in my comment you quoted.
Does this work for you?

This worked for me, thanks a lot was stuck on this for a whole day

Thanks for your instruction. But I didn't get a pop-up windows requiring my local admin username and password during step 3 and still have the "Catastophic failure". Any ideas?

@P-IVI-T
Copy link

P-IVI-T commented Mar 12, 2024

Tested on Windows 10 Pro.
@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install

This is the shorter and clearer version of what's already in my comment you quoted.
Does this work for you?

This worked for me, thanks a lot was stuck on this for a whole day

Thanks for your instruction. But I didn't get a pop-up windows requiring my local admin username and password during step 3 and still have the "Catastophic failure". Any ideas?

Is it possible you are already a local admin 🤔?

@guoran23
Copy link

Tested on Windows 10 Pro.
@thehairy, ok, now try this:

  1. In a Command Prompt (%windir%\system32\cmd.exe) running as admin, run:
    netsh winsock reset
  2. Reboot the computer.
  3. Then, in a Command Prompt (%windir%\system32\cmd.exe) not running as admin, run the following. It will have some pop-up windows requiring your admin username and password during the install, but the Cmd Prompt should not be in admin mode:
    # Update your WSL system
    wsl --update
    
    # Install the latest version of Ubuntu
    wsl --install

This is the shorter and clearer version of what's already in my comment you quoted.
Does this work for you?

This worked for me, thanks a lot was stuck on this for a whole day

Thanks for your instruction. But I didn't get a pop-up windows requiring my local admin username and password during step 3 and still have the "Catastophic failure". Any ideas?

Is it possible you are already a local admin 🤔?

I am in the same situation as the person asking the question. I'm logged in to Windows with my work email that doesn't have Admin rights, but I have a local admin account which I can run admin tasks with. I am sure I am using my work email user account.

@guoran23
Copy link

guoran23 commented Mar 13, 2024

Guess what? I just managed to install Ubuntu through WSL in the VS Code. I just did connect WSL then the VS code starts to install Ubuntu. I don't know what magic happed.
Now when I do "wsl --update" in the powershell or cmd, I get a pop-up window requiring my local admin.
Yet, my VS Code showed it was running WSL 1 instead of WSL 2. Then I upgraded from WSL 1 to WSL 2, it proceeded smoothly.

@P-IVI-T
Copy link

P-IVI-T commented Mar 13, 2024

Guess what? I just managed to install Ubuntu through WSL in the VS Code. I just did connect WSL then the VS code starts to install Ubuntu. I don't know what magic happed. Now when I do "wsl --update" in the powershell or cmd, I get a pop-up window requiring my local admin. Yet, my VS Code showed it was running WSL 1 instead of WSL 2. Then I upgraded from WSL 1 to WSL 2, it proceeded smoothly.

Glad to hear you got it working! I had to run the command 'wsl --set-default-version 2' and this fixed my issue on another computer when launching. Maybe it will help you.... ? There was a bit of magic to it on my end as well 😁

@okineadev
Copy link

I ran into catastrophic failure error and solved as per https://stackoverflow.com/a/78004733/598353

#11319 (comment)

This solution really helped me

@github-actions github-actions bot mentioned this issue Apr 1, 2024
2 tasks
@Josephood7
Copy link

Thanks to this comment, I resolved the problem. (https://stackoverflow.com/a/78004733)
I summarized a detailed procedure for this solution.

Steps:

  1. Download WSL package released by Microsoft (https://github.com/microsoft/WSL/releases)
  2. Open Command Prompt as Administrator
  3. Go to the download directory of the package cd Downloads
  4. Run command msiexec /package wsl.2.2.2.0.x64.msi
  5. Check if it is installed wsl --version

This approach does not require wsl --install command, so it avoids Catastrophic failure

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