Support for vaults in Windows Subsystem for Linux (WSL)

I tried the workaround from @PurplProto and it kind of worked. Her steps didn’t produce the desired result at startup. I had to run sudo mount -a to mount the system.

However, I’ve found another workaround.

The system worked after running these steps:

In fstab (note you have to explicitly mount C: first since we process fstab before automounting DrvFs):

In /etc/fstab

sudo nano /etc/fstab

Add the following lines

C:           /mnt/c         drvfs   rw,noatime,uid=1000,gid=1000,umask=22,fmask=11     0    0
/mnt/c/home/username/your/windows/folder  /home/username/your/ubuntu/folder none    bind                                               0    0

Then shutdown WSL from the windows terminal

wsl --shutdown

Reference: Automount additonal filesystems from fstab · Issue #2636 · microsoft/WSL · GitHub

1 Like