Fix lỗi cant find servfall trên ubuntu năm 2024

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open

omdxp opened this issue

Sep 11, 2020

· 54 comments

Comments

Environment

Windows build number: 10.0.19592.0

Steps to reproduce

I was working on my Ubuntu with wsl but somehow now it's not running and the output of my PowerShell is as follows:

PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.

WSL logs: https://aka.ms/AA9maq4

Expected behavior

I was using Ubuntu distribution using WSL very often, but now it cannot even run.

Actual behavior

Somehow the distribution cannot run.

The text was updated successfully, but these errors were encountered:

Look like the log is empty.

could you please dir %systemroot%\system32\lxss\tools\kernel to check if kernel exits? If not, please install the kernel

Look like the log is empty. could you please dir %systemroot%\system32\lxss\tools\kernel to check if kernel exits? If not, please install the kernel

Here's the output:

C:\Users\asusi>dir %systemroot%\system32\lxss\tools\kernel
 Volume in drive C has no label.
 Volume Serial Number is 8005-36CF
 Directory of C:\WINDOWS\system32\lxss\tools
22/03/2020  23:29        60.754.360 kernel
               1 File(s)     60.754.360 bytes
               0 Dir(s)  15.577.899.008 bytes free

Reinstalling the linux kernel and uninstalling other virtualization softwares(VirtualBox and VMware) solved it for me.

Piggybacking on this as I'm seeing the same issue, however, spashii's success did not work for me. My WSL is dead. :(

Logs: https://aka.ms/AA9p6ej

  • The kernel exists, but I attempted a reinstallation
  • Removing VMware player did not solve the issue, and no other virtualization is active
  • Removing WSL from the features list, rebooting, adding it, rebooting did not solve it
  • Attempting to remove Hyper-V failed and rolled back, despite removing all other feature dependencies and removing the network interface from device manager.

Piggybacking on this as I'm seeing the same issue, however, spashii's success did not work for me. My WSL is dead. :(

Logs: https://aka.ms/AA9p6ej

The kernel exists, but I attempted a reinstallation Removing VMware player did not solve the issue, and no other virtualization is active Removing WSL from the features list, rebooting, adding it, rebooting did not solve it Attempting to remove Hyper-V failed and rolled back, despite removing all other feature dependencies and removing the network interface from device manager.

Honestly, it didn't work for me as well, now I'm not even working on WSL because of this issue. Why something great as WSL is full of bugs? 😑😣

Thanks, @licanhua . It looks like my Windows installation had an issue configuring network adapters, and that was one of the reasons that Hyper-V wouldn't uninstall so I could refresh it. Creating a new virtual switch in the Hyper-V Manager also failed miserably. Naturally, I went through the normal Windows steps of using sfc and dism to attempt to restore my system, but both found no issues. I attempted to uninstall all of my network adapters, but they would give me a code 56 every time they reappeared, even brand new ones.. Once I uninstalled the drivers for them, my HID devices also became unable to do class configuration, which left me without a keyboard. Feeling both desperate and stupid, I grabbed the release preview ISO of the 20H2 release of Windows 10 and did an in place upgrade with my working mouse, and shockingly, I'm now up and running again with working network adapters, Hyper-V, and WSL.

¯\(°_o)/¯

I'm facing the same issue, and I'm thinking of resetting windows, but on wsl I have really important files, can I somehow export files or something else?

I'm facing the same issue, and I'm thinking of resetting windows, but on wsl I have really important files, can I somehow export files or something else?

Check if hyper-V is selected in Turn Windows features on or off

if you install linux wsl on another disk and the disk not connected.. error occured

Still present. Using WSL preview.

Default Distribution: Ubuntu
Default Version: 2
WSL version: 0.48.2.0
Kernel version: 5.10.60.1
WSLg version: 1.0.29
Windows version: 10.0.22000.282

Since there are possibilities that VM software is involved here, I do remember installing and uninstalling virtualbox between a working WSL and now a broken WSL. However, I cannot confirm that because I did not find a way to bring WSL back up and try to reproduce the problem yet.


Edit: Tried disabling WSL and adding it back. No luck.


Edit: Tried uninstalling VMWare. No luck. Tried doing network reset from system Settings / Network & Internet / Advanced network settings / Network Reset. No luck at first, a bunch of Hyper-V adapters left behind. However, after letting it sit there over night, these Hyper-V adapters disappears and now I am able to successfully boot WSL. Now I have no Hyper-V adapters at all.

I installed Ubuntu for VSL, from the Store, on Windows 11 some time ago and was using it happily. However, I messed up a node and npm upgrade inside Ubuntu and decided to uninstall and reinstall from the store. Uninstall and reinstall went smoothly, but now I get "The system cannot find the file specified" when I try to run Ubuntu in Terminal, and I'm thrown back into PowerShell. I haven't touched or opened Hyper-V between the uninstall and the reinstall of Ubuntu.

OK, after uninstalling again, I noticed that there was still a profile for Ubuntu in Windows Terminal. So I went into Terminal and removed that profile. Then I rebooted the Windows machine for good measure, reinstalled Ubuntu from the store, and now it runs fine in Terminal. So at least one issue seems to be that uninstalling a WSL doesn't remove the corresponding profile in Terminal, which it should do.

I'm also having this issue.

I'm having the same issue, but it seems to be only a windows terminal issue. If I run the exact same command configured in the windows terminal profile directly in powershell, it works. vs code also can still connect to the wsl instance without problem.

I have no idea of the root cause because it just started happening today without having installed/uninstalled/reconfigured anything. Maybe something auto updated somewhere, who knows.

Update: it's the "starting directory" in the windows terminal profile, which was set to ~ (which never worked anyway, the shell always launched into some windows directory). Apparently windows terminal tries to access it as a windows path and doesn't find it.

I also have had this issue after no installations/uninstallations/anything. Worked fine ~12 hours ago

Fix lỗi cant find servfall trên ubuntu năm 2024

Changing the directory from the default value fixed it, to %USERPROFILE%.

maxshlain, donuty-party, vcseventi, fourpastmidnight, nmckeeman, imposeren, ianaz, symbioHenry, flesnuk, sushi30, and 14 more reacted with thumbs up emoji ahmedTouati and TheButlah reacted with heart emoji Davidrjx and gouravsingh99 reacted with eyes emoji

All reactions

  • 👍24 reactions
  • ❤️2 reactions
  • 👀2 reactions

I also have had this issue after no installations/uninstallations/anything. Worked fine ~12 hours ago

Fix lỗi cant find servfall trên ubuntu năm 2024

Changing the directory from the default value fixed it, to %USERPROFILE%.

Yep, I have the exact same error. I have had no recent updates installed, had Hyper-V installed for the longest time with a working WSL. Just went to update my distribution given the latest security updates for various distros, and got this error for Ubuntu. The default Starting directory is ~, but as @SamJoan points out, setting this to %USERPROFILE% allowed the distro to start. Then on a whim, I tried setting the Starting directory to

PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.

0 and got the same error again. I don't think there's anything special about using %USERPROFILE%. Something is just broken in Windows Terminal when using a starting directory somewhere within the WSL distro. I'm fairly certain this is a Windows Terminal issue for two reasons:

  1. If I open the Ubunto WSL distribution from the start menu not using WT, but using the standard CMD host, it works just fine.
  2. Because I haven't had any Windows update in over a year—long story, but a Microsoft Windows Update in late 2019, and again two more times in early 2020 completely ERASED ALL my personal files (i.e. My Documents, Downloads, etc.) on my work laptop; so yeah, I haven't been updating!

HTH someone else out there. There's a bug for this in the Windows Terminal project here.

I also have had this issue after no installations/uninstallations/anything. Worked fine ~12 hours ago

Fix lỗi cant find servfall trên ubuntu năm 2024

Changing the directory from the default value fixed it, to %USERPROFILE%.

Hey I am facing the same problem, how did you change the directory?

You change it by clicking the down arrow next to the tabs then settings then under profiles on the left hand choose your distro. Now on the right side there it says starting directory

Fix lỗi cant find servfall trên ubuntu năm 2024

flesnuk, 2fa, mwtoews, Hnasar, Chizaram-Igolo, hoodielive, YgLK, brainwipe, and xxnickles reacted with thumbs up emoji hoodielive, devcodemi, ITAYC0HEN, and henriqueazevedo1999 reacted with heart emoji

All reactions

  • 👍9 reactions
  • ❤️4 reactions

You change it by clicking the down arrow next to the tabs then settings then under profiles on the left hand choose your distro. Now on the right side there it says starting directory
Fix lỗi cant find servfall trên ubuntu năm 2024

That worked. Thank you!

for me doing this worked wslconfig /u Ubuntu-20.04 -> to unregister unregistering the distribution and installing it again

eemjema, elchorro, thiswes, KishCom, milesbuckton, PWittix, kuhajeyan, phamtienhung, RonKu01, cmasdev, and 13 more reacted with thumbs up emoji milesbuckton reacted with laugh emoji mikechu-optimizely reacted with hooray emoji

All reactions

  • 👍23 reactions
  • 😄1 reaction
  • 🎉1 reaction

for me doing this worked wslconfig /u Ubuntu-20.04 -> to unregister unregistering the distribution and installing it again

PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.

2 and relaunch Kali linux work for me, thanks !

Yes, I unregistered

kali-linux in

wsl using wslconfig /u kali-linux and relaunched the Kali-Linux app.

I have the same issue, but I do not want to unregister my ubuntu and re-installing it again. I'll try to investigate more I have also set my starting directory as %USERPROFILE% - but the bug still happens

defining %USERPROFILE% solved it for me on a Server 2022 Terminal Server - THANKS!

For the time being from the file C:\Users.wslconfig comment this value.

kernel=C:\temp\myCustomKernel

key value default notes kernel string The Microsoft built kernel provided inbox An absolute Windows path to a custom Linux kernel.

Source : https://docs.microsoft.com/en-us/windows/wsl/wsl-config

You change it by clicking the down arrow next to the tabs then settings then under profiles on the left hand choose your distro. Now on the right side there it says starting directory
Fix lỗi cant find servfall trên ubuntu năm 2024

You wouldn't know how to get to this in Windows 11, would you? 😅

I'm having the same issue, but it seems to be only a windows terminal issue. If I run the exact same command configured in the windows terminal profile directly in powershell, it works. vs code also can still connect to the wsl instance without problem.

I have no idea of the root cause because it just started happening today without having installed/uninstalled/reconfigured anything. Maybe something auto updated somewhere, who knows.

Update: it's the "starting directory" in the windows terminal profile, which was set to ~ (which never worked anyway, the shell always launched into some windows directory). Apparently windows terminal tries to access it as a windows path and doesn't find it.

You are a stud. This was my issue.

When using %USERPROFILE% as the starting directory (at least in my case) Ubuntu starts in

PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.

  1. Since i rather keep home dir by default (~), i used some wacky workaround by setting starting directory to:

PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.

6 and so that starts in the home directory. So if someone wants to use it just set starting directory to

PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.

7.

i only solved with

wsl --shutdown // shutdown wsl wsl -l // list all distros wslconfig /unregister ubuntu // remove every distro, because for me none of them worked anymore wsl --install --distribution Ubuntu // reinstall Ubuntu

MubarakSULAYMAN, git1362, optionsx, sir-kokabi, PunchEnergyFTW, Abinashbunty, tamas888, JimmyJamTQBD, robin-senechal, sglbl, and 3 more reacted with thumbs up emoji edmund-leibert, MubarakSULAYMAN, vitor-mariano, git1362, optionsx, Abinashbunty, gsusmab, shu-vro, S-chahine, and Darc-Charlie reacted with hooray emoji aayushgore3499, JimmyJamTQBD, paq85, robin-senechal, S-chahine, and Darc-Charlie reacted with heart emoji robin-senechal and S-chahine reacted with rocket emoji

All reactions

  • 👍13 reactions
  • 🎉10 reactions
  • ❤️6 reactions
  • 🚀2 reactions

When using %USERPROFILE% as the starting directory (at least in my case) Ubuntu starts in

PS C:\WINDOWS\system32> wsl -l -v NAME STATE VERSION

  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.
4. Since i rather keep home dir by default (~), i used some wacky workaround by setting starting directory to:

PS C:\WINDOWS\system32> wsl -l -v NAME STATE VERSION

  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.

6 and so that starts in the home directory. So if someone wants to use it just set starting directory to

PS C:\WINDOWS\system32> wsl -l -v NAME STATE VERSION

  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.
7.

@BlixonX Thanks, this solved my issue! but I hope someone can really fix this bug.

You change it by clicking the down arrow next to the tabs then settings then under profiles on the left hand choose your distro. Now on the right side there it says starting directory
Fix lỗi cant find servfall trên ubuntu năm 2024
That worked. Thank you!

Solved it indeed.

I think the main error is because the system has a distro selected that does not exist.

Had the same error, now I can solve it with the following steps:

  • Uninstall installed districts.
  • Uninstall Docker (if you have it)
  • Open your console in admin mode, and type: C:\Users\asusi>dir %systemroot%\system32\lxss\tools\kernel Volume in drive C has no label. Volume Serial Number is 8005-36CF Directory of C:\WINDOWS\system32\lxss\tools 22/03/2020 23:29 60.754.360 kernel
               1 File(s)     60.754.360 bytes  
               0 Dir(s)  15.577.899.008 bytes free  
    
    3 to list the installed distros.
  • Remove all additional distros from the console with the following command:

C:\Users\asusi>dir %systemroot%\system32\lxss\tools\kernel
 Volume in drive C has no label.
 Volume Serial Number is 8005-36CF
 Directory of C:\WINDOWS\system32\lxss\tools
22/03/2020  23:29        60.754.360 kernel
               1 File(s)     60.754.360 bytes
               0 Dir(s)  15.577.899.008 bytes free

4

In NAME_DISTRO change with your distro. Delete each of the distros until you have none.

  • Now follow the official wsl installation guide. https://docs.microsoft.com/en-us/windows/wsl/install-manual

It will provide you with the following commands, execute them with the terminal in admin mode.

C:\Users\asusi>dir %systemroot%\system32\lxss\tools\kernel
 Volume in drive C has no label.
 Volume Serial Number is 8005-36CF
 Directory of C:\WINDOWS\system32\lxss\tools
22/03/2020  23:29        60.754.360 kernel
               1 File(s)     60.754.360 bytes
               0 Dir(s)  15.577.899.008 bytes free

5

C:\Users\asusi>dir %systemroot%\system32\lxss\tools\kernel
 Volume in drive C has no label.
 Volume Serial Number is 8005-36CF
 Directory of C:\WINDOWS\system32\lxss\tools
22/03/2020  23:29        60.754.360 kernel
               1 File(s)     60.754.360 bytes
               0 Dir(s)  15.577.899.008 bytes free

6

C:\Users\asusi>dir %systemroot%\system32\lxss\tools\kernel
 Volume in drive C has no label.
 Volume Serial Number is 8005-36CF
 Directory of C:\WINDOWS\system32\lxss\tools
22/03/2020  23:29        60.754.360 kernel
               1 File(s)     60.754.360 bytes
               0 Dir(s)  15.577.899.008 bytes free

7

Install kernel if you have it already installed, you should not install it again.

C:\Users\asusi>dir %systemroot%\system32\lxss\tools\kernel
 Volume in drive C has no label.
 Volume Serial Number is 8005-36CF
 Directory of C:\WINDOWS\system32\lxss\tools
22/03/2020  23:29        60.754.360 kernel
               1 File(s)     60.754.360 bytes
               0 Dir(s)  15.577.899.008 bytes free

8

Now if you can install the distro you want from the Microsoft Store.

I hope it works for you! 🔥

Fix lỗi cant find servfall trên ubuntu năm 2024
just set this ~ symbols and it's works perfectly!

My issue was quite different, in WSL --list, I have ubuntu v20 but i have ubuntu v22 is Installed in my PC, so whenever i opened ubuntu v22, it says "system cannot find the file specified, what i did was:

  • Uninstall Ubuntu v22
  • Reinstall step by step of the kernel
  • Open PowerShell as Administrator
  • WSL --list
  • Check whether any existed ubuntu/linux is still there.
  • If exist, --unregister *the ubuntu (eg. wsl --unregister name)
  • I installed my Ubuntu V22 again from microsoft store, and it works

Fix lỗi cant find servfall trên ubuntu năm 2024

I got this error when I manually disabled Hyper-V. I turned it back on and it worked

the Repair Function in settings Fixes the Issue for me:

Fix lỗi cant find servfall trên ubuntu năm 2024

Following steps worked for me:

Uninstall Ubuntu for wsl. Reset terminal terminal (deleting it's data) Reboot Open terminal App and delete Ubuntu profile Re-install Ubuntu for wsl

i only solved with wsl --shutdown // shutdown wsl wsl -l // list all distros wslconfig /unregister ubuntu // remove every distro, because for me none of them worked anymore wsl --install --distribution Ubuntu // reinstall Ubuntu

I was experiencing the same issue and this was the only thing that worked for me

Yes, I unregistered

kali-linux in

wsl using wslconfig /u kali-linux and relaunched the Kali-Linux app.

This works for me. You saved me a lot of time, thanks! After I execute

PS C:\WINDOWS\system32> wsl -l -v
  NAME      STATE           VERSION
  • Ubuntu Stopped 2 PS C:\WINDOWS\system32> wsl -d Ubuntu The system cannot find the file specified.

2, I need to open kali-linux from ms store to initialize the app.

Fix lỗi cant find servfall trên ubuntu năm 2024

i run my ubuntu as run as administer and work for me

Had this problem after having a bluescreen on startup caused by a driver's conflict after installing a PCIe device. solved the problem for me

I can fix my wsl by this way.

Fix lỗi cant find servfall trên ubuntu năm 2024

This might sound dumb but it took me a long time to figure out where everyone was setting the starting directory and was looking in Control Panel. It's in the Windows Terminal Settings menu then click your Ubuntu or Linux distro profile. Fixed it for me.

Fix lỗi cant find servfall trên ubuntu năm 2024

After upgrading the Docker Desktop, I encountered this problem. I restarted my laptop two times, and it worked.

Note: It seems to me that one can not have Ubuntu22.04 without having the base Ubuntu wsl installed. I landed into this issue because I uninstalled the base Ubuntu.

To fixthe issue:

  • I reinstalled the "Windows subSystem for Linux" windows store app which I had uninstalled. shoot!
  • I reinstalled the Ubuntu wsl and set my computer to use ubuntu22.04 as default.

In my case the issue was that wsl.exe wants to start the windows service named WSLService and it couldn't find the executable. The solution was to open regedit and change this

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSLService\ImagePath

to point to the correct location :

"C:\Program Files\WSL\wslservice.exe"

I tried all of this. Even reinstalling WSL completely doesn't work. I'm starting to think parts of WSL are in the Windows system image and if such parts are corrupt, you have to completely reinstall Windows. This is a super brittle system then, because reinstalling Windows completely removes applications and settings. If we now have to install multiple copies of Windows in different virtual machines in case of such corruption, then WSL is moot and we should just use VMs instead.

Hi everyone,

I had the same issue with my WSL. My problem was as follows:

  • I couldn't open WSL from the terminal (cmd or PowerShell).
  • I managed to open Ubuntu from the WSL shortcut.

To solve it, I did the following:

Go to installed applications and look for Linux (sorry if the screenshot is in Spanish).

Fix lỗi cant find servfall trên ubuntu năm 2024

Uninstall the WSL weighing 136MB.

After that, the WSL command started working again, so I ran the command WSL --install. The distros I already had installed (including the Docker one) remained intact.