WSL, how do I upgrade from FedoraLinux-42 to FedoraLinux-43?

On Windows, what is the correct way to upgrade WSL from FedoraLinux-42 to FedoraLinux-43?

I tried the instructions on this page:

Upgrading Fedora Linux Using DNF System Plugin :: Fedora Docs

Got:

Catastrophic failure
Error code: Wsl/Service/E_UNEXPECTED
[process exited with code 4294967295 (0xffffffff)]

(which went away after I did wsl --update in admin powershell :anxious_face_with_sweat:)

Not sure it was upgraded correctly. It’s still listed as FedoraLinux-42 but cat /etc/fedora-release says 43

Feels like a bit of a mess, the upgrade process was not pleasant.

Help?

I have no idea but I’m glad to see a fellow KLF fan here.

Thanks, for now I’m just installing the new version, migrating my files and configs over, and deleting the old one.

That is the name that you give a linux install to Windows WSL’s config if I’m guessing where you are seeing this.

It is not part of the Fedora install.

I’ve not tried that upgrade yet but I’m surprised that it was messy.
Maybe the instructions should include a wsl --update to make Windows happy?

I’ve just completed this upgrade based on the previous comments, but for the sake of clarity, these are the exact steps I followed:

In Fedora itself:

sudo dnf upgrade --refresh -y
sudo shutdown -h now

Launch Fedora again.

sudo dnf system-upgrade download --releasever=43
sudo dnf5 offline reboot

Wait a couple of minutes (depending on the size of your current installation and the number of packages to be installed; mine was around 250).

In PowerShell:

wsl --update

Still in PowerShell, click the arrow, select Settings, and under Profiles click FedoraLinux-42. Change the name from 42 to 43 and click Save.

Next, open the Windows menu, type Fedora, right-click FedoraLinux-42, and select Open file location. Right-click FedoraLinux-42, press F2, change 42 to 43, and press Enter.

Lastly, open regedit and change 42 to 43 in:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{uuid-string}\DistributionName
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\{uuid-string}\ShortcutPath

It’s mostly like any other Fedora in-place upgrade, apart from the Windows-specific steps.

Edit: Added changes to registry keys
Edit 2: Added PowerShell profile rename based on digitalman comment.

Thanks for the complete WSL upgrade instructions. I just followed them successfully. These are very useful and I’ll most certainly forget them by next upgrade. Does anyone know if we can get these put on the website, perhaps here?

Also, I launch it from Windows Terminal Preview so an additional step I had to do was go into the Terminal Preview settings and find Fedora-42 and rename it to 43.

Thanks again for the solution @mandolin

Today, I followed your steps to go from WSL Fedora 43 to 44.

Some comments:

  • Where it says 43 I changed it to 44, obviously.
  • sudo shutdown -h now then launch again made my shell go a bit bonkers, complaining about invalid paths, so I did a hard reboot, when I came back it was fine.
  • The regedit step had a 3rd key OsVersion that I changed from 43 to 44.

Ditto.

It might get a little more attention if someone filed an issue here:

If someone volunteered to write it up in AsciiDoc and submit a PR, it could be added fairly quickly.

I found this page on Fedora WSL, this would be a great place to document how to upgrade versions:

Here’s a GitHub gist with the steps:
Upgrading Fedora in WSL

Feel free to reuse or adapt any of the content to improve Fedora’s documentation. No attribution needed.

This is great, thanks. You might consider adding this extra step I had to do:

Also, I launch it from Windows Terminal Preview so an additional step I had to do was go into the Terminal Preview settings and find Fedora-42 and rename it to 43.