• Notes
  • Articles
  • Followers 30
  • Following 50
  • Remote follow

Nevkontakte
@me@m.nevkontakte.com

Lawful neutral. Definitely not a cat in a hat. Opinions are of Cthulhu. what/why.

Long-form

nevkontakte.com

Chirp

twitter.com/nevkontakte

Code

github.com/nevkontakte

🔑
Nevkontakte's avatar
Nevkontakte
@me@m.nevkontakte.com

A quick not to my future self, on how to unfuck #wsl2 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.
  • permalink
  • interact from your instance
  • 4 months ago
Powered by microblog.pub 2.0.0+dev and the ActivityPub protocol. Admin.