Software & AppsOperating SystemLinux

Fixing WSL Ubuntu installation error on Windows 11

Ubuntu 16

In this article, we will explore how to resolve a common error that occurs during the installation of Ubuntu on Windows Subsystem for Linux (WSL) on Windows 11. The error, “WslRegisterDistribution failed with error: 0x80370102”, can be fixed by following a series of steps.

Checking the WSL Installation

First, confirm whether WSL is installed on your system. Open PowerShell and run the following command:

wsl -l -v

This command lists all installed distributions along with their WSL versions. If no distributions are listed, proceed to the next step.

Enabling Virtual Machine Platform

The error often occurs when the Virtual Machine Platform Windows feature is not enabled, or when virtualization is not enabled in the BIOS.

To check if virtualization is enabled, run the following command in PowerShell:

systeminfo.exe

In the output, under the Hyper-V requirements section, ensure that “Virtualization Enabled In Firmware” is set to “Yes”. If it’s not, you will need to enable virtualization in your system’s BIOS settings. The process to do this varies depending on your system’s manufacturer and model, so refer to your system’s documentation or manufacturer’s website for instructions.

Uninstalling Ubuntu

If virtualization is enabled but the error persists, try manually uninstalling Ubuntu with the following command:

wsl --unregister Ubuntu

This command unregisters and uninstalls the Ubuntu distribution.

Reinstalling Ubuntu

After uninstalling Ubuntu, restart your computer. Then, reinstall Ubuntu by running the following command:

wsl --install -d Ubuntu

This command installs Ubuntu on your WSL.

Enabling Virtual Machine Platform

If the error still occurs, try enabling the Virtual Machine Platform feature manually. Run the following command in an Administrative PowerShell:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

This command enables the Virtual Machine Platform feature on your Windows system. Restart your computer after running this command.

Then, run the following command:

wsl --set-default-version 2

This command sets the default WSL version to 2.

Finally, try installing Ubuntu again:

wsl --install -d Ubuntu

Updating Windows and Enabling WSL

If none of the above steps resolve the issue, ensure that your Windows system is fully updated and that WSL is enabled. You can check for updates in the Windows Update settings. To enable WSL, go to the “Turn Windows features on or off” menu and check the box next to “Windows Subsystem for Linux”.

If you continue to encounter the error, it may be helpful to seek further assistance from the Windows or WSL community forums or consult Microsoft’s official documentation on WSL installation and troubleshooting.

By following these steps, you should be able to resolve the “WslRegisterDistribution failed with error: 0x80370102” error and successfully install Ubuntu on WSL on Windows 11.

What is WSL?

WSL stands for Windows Subsystem for Linux. It is a compatibility layer in Windows that allows you to run a Linux environment directly on your Windows machine.

Why am I getting the “WslRegisterDistribution failed with error: 0x80370102” error?

This error usually occurs when the Virtual Machine Platform feature is not enabled or when virtualization is not enabled in the BIOS.

How do I check if WSL is installed on my system?

Open PowerShell and run the command wsl -l -v. This command will list all installed distributions along with their WSL versions.

How do I enable virtualization in the BIOS?

The process to enable virtualization in the BIOS varies depending on your system’s manufacturer and model. You can refer to your system’s documentation or the manufacturer’s website for specific instructions.

How do I uninstall Ubuntu from WSL?

You can uninstall Ubuntu by running the command wsl --unregister Ubuntu in PowerShell. This command unregisters and uninstalls the Ubuntu distribution.

How do I reinstall Ubuntu on WSL?

After uninstalling Ubuntu, restart your computer and run the command wsl --install -d Ubuntu to reinstall Ubuntu on WSL.

How do I enable the Virtual Machine Platform feature manually?

Run the command dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart in an Administrative PowerShell. This command enables the Virtual Machine Platform feature on your Windows system. Restart your computer after running this command.

How do I set the default WSL version to 2?

Run the command wsl --set-default-version 2 in PowerShell. This command sets the default WSL version to 2.

How do I update Windows and enable WSL?

Check for updates in the Windows Update settings to ensure your Windows system is fully updated. To enable WSL, go to the "Turn Windows features on or off" menu and check the box next to "Windows Subsystem for Linux".

Where can I find further assistance or documentation on WSL installation and troubleshooting?

You can seek further assistance from the Windows or WSL community forums or consult Microsoft’s official documentation on WSL installation and troubleshooting at Microsoft’s official documentation.

Leave a Comment

Your email address will not be published. Required fields are marked *