-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL2: Read-only file system error #6220
Comments
Spiritually same #4833. From inside WSL, try:
...For the device, use the root ext4 filesystem ( |
@therealkenc I think that fixed it! Just for future reference for anyone else, the |
@sali0 can you show me full commands to fix the error? I also have same problem when i build a image from a dockerfile in wsl2. |
|
Thanks a lot! This worked for me:
|
Hey guys, I'm having the same error message, but when I run the
Any idea what I should try next? |
@toadslop I have the same message as you, did you fix it? |
Hi Hadhemi,
I did manage to solve the problem, but interestingly it turned out the
issue was with my docker compose file, not with WSL.
The issue was that I had set a volume of the file to read only on a
different pc, after I had already built the image and all writing was
finished.
Then I tried to rebuild on a different computer so the write steps weren't
done, but the read-only flag was still there.
That was actually what caused my problem.
If your problem is the same as mine, then check your docker compose for
read only flags and try removing them.
Hope that helps!
Best,
Brian
|
I was able to resolve this issue by taking the following steps:
|
I know this is old, but I ran into the same error message and it turned out my disk was full. I used this article to move my Ubuntu installation to a different drive. |
I just ran into this today, and
followed by Another command I tried that didn't work was I needed to restart my Windows 10 PC to install updates, and doing that worked! I don't know if just a regular restart, without installing updates, would have solved the problem. |
Thanks a lot @luisromeroaraya . This worked for me. |
|
Inconsistent mount &
|
Hello, I'm facing the same problem as @brucejo75. With Ubuntu WSL, I can write files for a few minutes after startup and then here is the output of device fs_type label mount point
---------------------------------------------------------------------------------
/dev/sdb swap [SWAP]
/dev/sdc ext4 ROOTFS /
/dev/sda ext4 (in use) I'm using WSL to download a specific conda package called Vina that cannot install properly on windows. Right after restarting WSL, I called these : $ cd <adir>
$ conda install pytorch Then, the installation started correctly until this error show up :
here is the output of device fs_type label mount point
---------------------------------------------------------------------------------
/dev/sdb swap [SWAP]
/dev/sda ext4 (in use) the /dev/sdc on / type ext4 (ro,relatime,discard,errors=remount-ro,data=ordered)
/dev/sdc on /mnt/wslg/distro type ext4 (ro,relatime,discard,errors=remount-ro,data=ordered)
/dev/sdc on /snap type ext4 (ro,relatime,discard,errors=remount-ro,data=ordered) Additional informationWhen I tried I don't know what to do next, thanks in advance for the help 🤷 |
@paradoxe-tech, I would double check all the changes you made are consistent:
Note: I am running with Are you running WSL1 or WSL2? (WSL2 is recommended) |
Environment
Steps to reproduce
Doing anything to write to disk is coming up as an error. Command 'touch test' results in
touch: cannot touch 'test': Read-only file system
I suspect WSL2 thinks disk space is gone, but my C drive (which houses WSL2) still has 700 gigabytes left. Doing a
sudo dmesg -w
results in:When I run
bash e2fsck -D
I just get thehelp
menu for e2fsck.Some extra info:
When running
df
, this is my result (C drive is 1 tb ssd and D drive is 1 tb hdd):Expected behavior
I was able to use WSL perfectly fine until yesterday. Now anything writing to disk results in this error.
The text was updated successfully, but these errors were encountered: