I can’t remember what triggered it, but every time I tried to start Ubuntu in Windows 10, I got the following error:
WslRegisterDistibution: failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.
I uninstalled and reinstalled Ubuntu, WSL2, ran sfc /scannow, and did everything I could to fix it. Then in a thread somebody mentioned that creating a new Virtual Switch in Hyper-V Manager solved the problem. So, I enabled Hyper-V, rebooted, and tried to start Ubuntu. It failed with the error above. Then I went into Hyper-V Manager, clicked on Virtual Switch Manager and created a new virtual switch as shown below. Make it an External switch.
I’m glad to say that that actually solved the problem, and WSL2 is back up and running!