Processing fstab with mount -a failed
Dec 5
I use Windows 11 as operating system. Its build number is: 22000.348
I installed Debian from store, and then I installed Windows Subsystem for Linux Preview.
WSL version is: 2
Debian runs correctly and there is no problem with it. But when I run Windows Subsystem for Linux Preview application, this error occurs:
Processing fstab with mount -a failed.
[process exited with code 1 (0x00000001)]
- Why is this happening?
- How Can I prevent this?
- What Windows Subsystem for Linux application does?
1 answer
Accepted answer · original discussion
Dec 5
From the comments, it sounded like this may be due to a bug of some sort in the Preview version of WSL installed from the Store.
Ultimately (also from the comments), the problem turned out to be that one of the Docker WSL instances became the "default" for WSL. So running the "Debian" distribution specifically would work. Running the WSL application (which runs wsl.exe),however, was attempting to start the docker image, which isn't meant to be accessed directly (and was resulting in the fstab error).
This was found via wsl -l -v showing the Docker image as default.
The solution was to use:
wsl -s Debian
... to set the default distribution.
While this isn't necessary a "bug", there is an open Github issue suggesting that WSL have a mechanism that will allow docker-desktop-data (and other distributions that aren't supposed to be run by the end-user) to be "hidden".
1 question comment
Use comments to ask for clarification. Post a solution as an answer.
Dec 5
wsl -l -v shows me debian and 2 other distros which were for docker. I found out that the default distro is docker and not debian. That's why that error occurs. I ran wsl -s Debian in order to set debian as default distro, and the problem solved. You could write this as an answer ,so that, I can mark your answer as an accepted answer.