Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • I like it -- Like I said in my answer, this should be a reliable way to get around the timing issue, so I'm really glad you took the time to document the proper configuration! Systemd mounts also (IIRC) some additional flexibility with dependency management and timing. Users can even mix-and-match, using your System configuration in distributions where they have it enabled, and the boot option I mention in others. They'll still be accessible in both directions. Great first answer! Commented Feb 9, 2023 at 4:26
  • One minor suggestion as I read through it in detail - Perhaps change the filename to just /etc/systemd/system/wsl-instance.mount -- There's really no reason to have a unique filename based on the distro_name, right? Commented Feb 9, 2023 at 4:32
  • I'm not sure if that filename will work. I'm no expert, but I think systemctl wants the name of the file to match the "where" path given in the file. Also, I couldn't have gotten this answer without your original answer -- thanks. Commented Feb 15, 2023 at 20:22
  • It seems that the file name should be /etc/systemd/system/wsl-instance-${WSL_DISTRO_NAME}.mount instead (with extension .mount). In addition, make sure there is no hypen - in WSL_DISTRO_NAME! Or an error Where= setting doesn't match unit name. Refusing. will occur (unix.stackexchange.com/a/345518/438616). One simple solution in this case is to replace all ${WSL_DISTRO_NAME} with a name without hypen.
    – sup39
    Commented Apr 17, 2023 at 1:17