Timeline for Is there a way to access files from one WSL 2 distro/image in another one?
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 9 at 14:04 | review | Suggested edits | |||
Jul 9 at 15:49 | |||||
Apr 17, 2023 at 1:17 | comment | added | sup39 |
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.
|
|
Feb 15, 2023 at 20:22 | comment | added | Steve Meierhofer | 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. | |
Feb 9, 2023 at 4:32 | comment | added | NotTheDr01ds |
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?
|
|
S Feb 9, 2023 at 4:30 | review | First answers | |||
Feb 9, 2023 at 4:36 | |||||
S Feb 9, 2023 at 4:30 | history | edited | NotTheDr01ds | CC BY-SA 4.0 |
As of 1.0.0 last year, it runs under Windows 10 as well.
|
Feb 9, 2023 at 4:26 | comment | added | NotTheDr01ds |
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!
|
|
Feb 8, 2023 at 21:05 | review | Late answers | |||
Feb 8, 2023 at 22:23 | |||||
Feb 8, 2023 at 20:50 | history | edited | Steve Meierhofer | CC BY-SA 4.0 |
deleted 2 characters in body
|
S Feb 8, 2023 at 20:49 | review | First answers | |||
Feb 8, 2023 at 21:41 | |||||
S Feb 8, 2023 at 20:49 | history | answered | Steve Meierhofer | CC BY-SA 4.0 |