Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Tatsuta Age
Apr 21, 2005

so good at being in trouble


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

Adbot
ADBOT LOVES YOU

Tatsuta Age
Apr 21, 2005

so good at being in trouble


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.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply