13

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?
4
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Dec 5, 2021 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! Dec 5, 2021 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 5, 2021 at 17:45
  • 1
    @Parsa Excellent - Glad that got you in the right direction! Dec 5, 2021 at 21:00

2 Answers 2

23

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

4
  • 3
    Perfection. Thank you!
    – cautionbug
    Feb 17, 2022 at 14:06
  • 3
    Fantastic help - didn't realize WSL would be running multiple images
    – Rob G
    Oct 16, 2022 at 20:17
  • This solution did not work for me with Ubuntu and Mariner (no docker-desktop) in WSL. It seems to be something else.
    – Kai Walter
    Nov 17, 2022 at 4:45
  • My default distro was set to docker-desktop-data and switching it to Ubuntu did the trick. Thank you. Sep 27 at 13:39
2

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.

4
  • 1
    It really shouldn't cause any problem with Docker Desktop. I have more than a dozen WSL distributions installed along with Docker Desktop. Mar 12 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 at 19:20
  • 2
    Fair enough - I think it was something else, but I understand you wanting to caution others :-). Mar 19 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 at 18:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .