9

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?
Parsa
  • 213
  • 3
  • 6
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 05 '21 at 11:13
  • 1
    Hello and Welcome to Super User! I haven't installed the WSL Preview from the Store yet, but my understanding is that it replaces the existing WSL. So I'm confused as to why "Debian" would still be running, but "WSL Preview" would not -- Debian should run *inside* WSL Preview. Do you have multiple distributions? Run `wsl -l -v` and add the output to your question if you would. Thanks! – NotTheDr01ds Dec 05 '21 at 14:33
  • 1
    @NotTheDr01ds thank you for your recommendation, the commands `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. – Parsa Dec 05 '21 at 17:45
  • 1
    @Parsa Excellent - Glad that got you in the right direction! – NotTheDr01ds Dec 05 '21 at 21:00

2 Answers2

19

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".

NotTheDr01ds
  • 17,574
  • 4
  • 44
  • 81
1

Expanding on NotTheDr01ds answer:

If you need to install another distro, such as ubuntu, you can do so via:

wsl --install
#Warning - may break docker desktop!

You can then have that distro be the default instead of the not working docker integration.

However, this will possibly then break your docker desktop integration.

Panky
  • 131
  • 6
  • 1
    It really shouldn't cause any problem with Docker Desktop. I have more than a dozen WSL distributions installed along with Docker Desktop. – NotTheDr01ds Mar 12 '23 at 21:48
  • @NotTheDr01ds - I was ultimately able to recover it after a reboot and some other tweaking, but running the above did break my currently running containers. To be honest, I don't really understand why that break occurred, but since that happened to me I just want to call out some risk there so others don't get stuck. – Panky Mar 16 '23 at 19:20
  • 2
    Fair enough - I think it was something else, but I understand you wanting to caution others :-). – NotTheDr01ds Mar 19 '23 at 17:04
  • As I have gained some more knowledge here, it seems very likely the issue was that, if you install an additional distro, Docker destop may mark that as a new 'default' and break things. – Panky Jul 30 '23 at 18:29