2022年4月12日火曜日

Ubuntuが起動しなくなった "WslRegisterDistribution failed"

起動時に
WSL does not work after automatic update "WslRegisterDistribution failed with error: 0x80070050"
とメッセージが出て起動しない。

こんなページを発見
https://askubuntu.com/questions/1401482/wsl-does-not-work-after-automatic-update-wslregisterdistribution-failed-with-er

どうも直近のアップデートでおかしくなったらしい。

見つけたリンク先の内容を試してみる

I know this was closed, but I found an (albeit crappy) fix.
1) Stop WSL with wsl --shutdown in powershell or cmd
2) Open the run dialog (Win + R) and enter `%localappdata%\Packages`
3) Find the folder starting with "CanonicalGroupLimited" and delete it (not permanently)
4) Start WSL again and let the update happen. Create a new user account.
5) Stop WSL again and restore the deleted folder from Recycle Bin, choosing to overwrite duplicate files When you start WSL again you should be back in your original account with all of your original files.

1. Powershell (もしくはcmd) でwslをシャットダウンする
  > wsl --shutdown
2. Win+Rでダイヤログを出し、%localappdata%\Packages と入力する。
3. エクスプローラーが起動するので CanonicalGroupLimited で始まるフォルダーを削除(移動がいい)する。
4. 以降がダメだったので、コントロールパネルの「アプリと機能」でUbuntuをリセット。

Ubuntuを起動すると新規ユーザー登録になったので登録し、wslをシャットダウンして削除したフォルダーを元に戻した。

動いているがアップデートサーバーがやけに少ない。



0 コメント: