Created
March 5, 2024 19:10
-
-
Save chris-piekarski/91987efadbce2d74ba7ec2e02a3bea5f to your computer and use it in GitHub Desktop.
WSL stuck in read only filesystem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://learn.microsoft.com/en-us/windows/wsl/disk-space#how-to-repair-a-vhd-mounting-error | |
(Get-ChildItem -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | Where-Object { $_.GetValue("DistributionName") -eq 'Ubuntu' }).GetValue("BasePath") + "\ext4.vhdx" | |
wsl --shutdwon | |
wsl.exe --mount <path-to-ext4.vhdx> --vhd --bare | |
wsl -d Ubuntu -e sudo fsck -y /dev/sda |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment