Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2796

I'm using Ubuntu on WSL1 and recently upgraded to Windows 11. Problem with \\wsl$ after login: the Ubuntu folder isn't accessible

$
0
0

Edit: Should I submit this on stackoverflow?

Sorry that this isn't strictly Ubuntu, but it is in regards to running Ubuntu under WSL1.

My work machine was recently upgraded to Windows 11 and I think this problem seemed to come at the same time. I've been using WSL1 on Win10 for more than a year prior to the Win11 upgrade and haven't upgraded from the Windows Store.
Now, after every login, I'm unable to access my WSL directory under \\wsl$\Ubuntu. I have a desktop shortcut that I use to launch WSL1 that has Target: C:\Windows\System32\wsl.exe and "Start In": \\wsl$\Ubuntu\home\username, which launches the WSL terminal and used to start me in my home directory. Now when I launch using this shortcut, the terminal says

"An error occurred mounting one of your file systems. Please run 'dmesg' for more details."

And my WSL terminal has set me in the C:\Windows\System32 directory.

Here are the results of dmesg:

$ dmesg -T[Mon May  8 10:43:02 2023]  Microsoft 4.4.0-22621.1635-Microsoft 4.4.35[Mon May  8 10:43:19 2023] <3>init: (1) ERROR: UtilCreateProcessAndWait:722: /bin/mount failed with status[Mon May  8 10:43:19 2023] 2000[Mon May  8 10:43:19 2023] <3>init: (1) ERROR: ConfigMountFsTab:2484: Processing fstab with mount -a failed.[Mon May  8 10:43:19 2023] ;

If I click \\wsl$\Ubuntu in file explorer (which I normally don't do, but I was just checking it), an error box pops up that says:

\\wsl.localhost\Ubuntu is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.Attempt to access invalid address.

To get things working, I run a Powershell script with these contents:

cmd.exe /c wsl --shutdownStart-Sleep -Seconds 1cmd.exe /c start wsl.exe

Then I can access \\wsl$\Ubuntu\home\username like usual and my WSL shortcut works. I run dmesg and I get this:

3325 > dmesg -T[Mon May  8 11:08:48 2023]  Microsoft 4.4.0-22621.1635-Microsoft 4.4.35

More information, for anyone still reading, I haven't upgraded WSL from the Windows store, despite the advertisement that I sometimes get. I prefer WSL1 because of the file system access advantages. Should I upgrade from the Store and will I still be on WSL1?


Viewing all articles
Browse latest Browse all 2796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>