|
Problem description: I can't get WSL2 to mount my network storage automatically (Ubuntu 20.04) Attempted fixes: - Setup /etc/fstab to mount the drives, which works with "sudo mount -a", but doesn't work as a cron task since... - cron service doesnt't start automatically in WSL2 apparently - Using /etc/wsl.conf to set automount stuff works fine for drvfs (local drives), but not for networked ones - Passing the drive as mapped to Windows (Z: drive) to WSL works automatically via drvfs as well, but causes weird permission errors, and I want this to be platform agnostic wherever I deploy it, so not wanted It does work if I manually log in and do "sudo mount -a" or "service cron start" but where's the fun in that? Looking for the most straightforward not-silly way to do this. I'm testing out hosting my plex stack in WSL2 so the mounts need to work if the computer reboots and stuff. Recent changes: No, first time trying this Operating system: Ubuntu 20.04 WSL2 instance on Windows 10 Pro (10.0.19042 - Build 19042) System specs: Not really important Location: US I have Googled and read the FAQ: Yes Tatsuta Age fucked around with this message at 15:07 on Nov 24, 2020 |
# ? Nov 24, 2020 05:49 |
|
|
# ? May 3, 2024 10:17 |
|
So I did this a real lazy way and just set my user in sudoers to not need a passwd to do mount, and then added mount -a to my .bashrc. Kinda sucks but whatever.
|
# ? Nov 25, 2020 17:27 |