A quick not to my future self, on how to unfuck root file system:

  1. Find the location of your disk image, for Ubuntu it would be something like C:\Users\aleks\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx.
  2. Make a fucking backup!
  3. Install a new wsl distro. Could be anything, if you have Docker Desktop, you probably already have docker-desktop distro, which would do.
  4. Connect the image to our recovery distro: wsl -d docker-desktop --mount --vhd C:\Users\aleks\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx
  5. Go into the recovery distro: wsl -d docker-desktop.
  6. Figure out which device your image corresponds to: ls /dev/sd*.
  7. Unmount it: umount /dev/sdX.
  8. Actually unfuck the image: e2fsck /dev/sdX.
  9. Exit wsl and shut it all the way down: wsl --shutdown.
  10. With any luck, you can start your main distro and it will be fine.