Note: For others who come across this who are experiencing the 0x8027025a error when installing Ubuntu 22.04 in WSL, please note that this answer did not solve the problem for the original poster. If all went well, you should be in Ubuntu 22.04 as your default user. # The following 4 lines must be entered togetherĮxit Ubuntu, and from PowerShell: wsl -terminate Ubuntu2204 Usermod -aG adm,cdrom,sudo,dip,plugdev,lxd $NEWUSER # This will create your username/password Proceed to the next section (which can be done independently of this one).įrom within Ubuntu 22.04 read -p "Username: " NEWUSER You should have a similar startup screen that you show above - You'll be logged in as the root user. If the image imports successfully, then wsl ~ -d Ubuntu2204 to start it. Wsl -import Ubuntu2204 "$WSL_INSTANCE_PATH" "$WSL_IMAGE_PATH\Ubuntu22.04.tar.gz" -version 2 # Make sure these paths match those created above Start a normal PowerShell and copy, paste, and run each line individually: wsl -shutdown $UBUNTU_ROOTFS = (Get-ChildItem -Recurse 'C:\Program Files\WindowsApps\Canonical*22.04*' | Where-Object ).FullNameĬp "$UBUNTU_ROOTFS" "$WSL_IMAGE_PATH\Ubuntu22.04.tar.gz" $WSL_INSTANCE_PATH = "$env:USERPROFILE\WSL\Instances" $WSL_IMAGE_PATH = "$env:USERPROFILE\WSL\Images" Start an Administrative PowerShell and copy, paste, and run each line individually: # Edit paths below to your preference You might be able to skip straight to the next step, but I'm including this one as the "safe" option of making sure that the rootfs is extracted properly.
Option 3: Manually install the rootfs and create the correct user If this doesn't work for some reason, then move on to the next options. If so, and the distribution comes up as your user, then:
Hopefully, this will allow you to enter it successfully. It will go straight to the console-based username/password configuration. Note that it will skip the TUI configuration of the username/password, along with the optional /etc/wsl.conf step that it runs for WSL2. If I'm right (and I know I haven't been so far), then this installer will complete successfully. Note that the installer will take much longer to run under WSL1. Uninstall the failed Ubuntu 22.04, again (fun, I know)įrom PowerShell, run: wsl -set-default-version 1 If that works, you can then convert to WSL2. Let's see if we can avoid that failure by installing as WSL1. I believe this step is what is failing with The app didn't start in the required time. Ubuntu 22.04 only uses the new TUI configuration step under WSL2. Option 2: Install as WSL1, then convert to WSL2 That should skip the problematic portion of the install and be successful. Install 22.04 using the "old" non-graphical installer: ubuntu2204.exe install -ui=none Unregister the existing 22.04 installation with: wsl -unregister Ubuntu-22.04
# upgrade the distro sudo apt-get upgrade -y sudo apt-get autoremove -y # install docker sudo apt-get install -y docker-ce containerd.io
# update the package manager with the new repos sudo apt-get update Sudo add-apt-repository "deb $(lsb_release -cs ) stable" # (optional) add kubectl key and repoĮcho "deb kubernetes-xenial main" | sudo tee /etc/apt//kubernetes.list Sudo usermod -aG docker $ # add Docker key and repo # create a group named docker and add yourself to it # so that we don't have to type sudo docker every time # note you will need to logout and login before this takes affect (which we do later) sudo groupadd docker Sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common libssl-dev libffi-dev git wget nano # update the package manager and install some prerequisites (all of these aren't technically required) sudo apt-get update