-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
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
WSL won't run Ubuntu #7126
Comments
Are you able to convert your distro back to WSL 1, remove the contents of /etc/fstab and then convert back to WSL 2? |
I tried converting to WSL 1 and I am still unable to run the distribution.
I thought I wrote that earlier. It's a different error message about an
I/O error. I will get a screenshot of that next time I'm able to get to my
computer.
|
Ah I saw "tried converting back to WSL 1 and then again to WSL 2 with no success" and wondered if the first conversion worked. If you can share that error that you're seeing there that would be helpful! |
Will do!
|
In general to resolve this issue, you need to modify the /etc/fstab file inside of your distribution. My best recommendation would be for you to use the However I see that you're not on the latest Insider build and so don't have access to that feature. I would next recommend mounting this VHD into a Linux VM in Hyper-V and editing the file that way. Lastly If you are on WSL 1 then the files are stored on the NT file system, and while it is possible to browse and open to them using an application like notepad and edit them, it is very likely that this will strip important metadata from them and is not something we'd directly recommend. Please let me know if these solutions help resolve your issue! |
I am working on preparing a Linux VM to accomplish your instructions. I'll follow up with this shortly. That said... sidebar, surely you can realize how tedious of a potential solution this is. Is there any reason why the WSL enhancements haven't been brought over to the Release channel? From what I can see, the numerous improvements to WSL appear to be stable and effectively complete from a development perspective. Why lock them behind beta builds of Windows and force people to turn their entire system into a Windows testbed just to get completed and highly necessary features in WSL? All of the WSL documentation seems to have been updated to essentially expect that users have access to all manner of commands that the normal user running a release channel build of Windows can't access. |
After several hours of fiddling around with mounting the VHDX in another VM, I was able to edit the /etc/fstab file and now the distro boots properly in WSL. So, this solution works. I have to say, though, this solution is ... pretty bad, and I hope you keep this open as a fairly significant bug. An unavailable resource in /etc/fstab shouldn't completely brick a system and require this extensive of a fix. It took me about 4 hours to provision a new VM, fiddle around with trying to mount the VHDX, and then figure out why the VHDX was being held open by the system for no apparent reason preventing me from both mounting directly and overwriting it with a new copy (this was fixed with a system reboot, which shouldn't have been necessary). All of this because some network resources weren't available. There's no reason why that should completely brick a VM and require a hard-drive transplant to fix. |
Hi @dever23b , thank you for the feedback! The latest features in the current insiders channel will be part of the next major Windows release, which will finally put them onto the stable channel. As well I will keep this issue open as a tracker for fixing this /etc/fstab issue. Thank you again for filing this! |
I don't know if this will work for anyone else, but I accidentally discovered a solution. Do a fresh boot, and run bash.exe from an elevated powershell prompt (no idea if that last bit is necessary). it will let you boot, but says this
now you can edit your /etc/fstab |
I have exactly the same issue at work. Had a hard time to try to reinstall Hyper V, WSL and WSL2 on windows features, as well as docker desktop hut no luck and still says one of the hyper v components is not running. This issue also causes my wsl2 failed to run and my docker desktop is currently failed to start. It was running in the previous month but suddenly stopped running after some updates from windows. My laptop OS is windows 10 enterprise 10.0.19042 N/A Build 19042. I am pretty sure my CPU virtualisation is enabled as I saw it under the performance section in my task manager window. I had this issue for more than 2 weeks and it's such a pain to solve it! |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Windows Build Number
Microsoft Windows [Version 10.0.19043.1081]
WSL Version
Kernel Version
Unknown (can't access either command)
Distro Version
Ubuntu 20.04 LTS
Other Software
No response
Repro Steps
I'm not sure which update did it, but after updating Windows 10 I can no longer start my Ubuntu distro in WSL (it's my only distro, so I'm not sure if others are affected). I have tried converting back to WSL 1 and then again to WSL 2 with no success. It seems that there have been significant improvements to WSL, but they're all locked in Insider Preview releases that are not available to me. I cannot use wsl --mount to mount the disk and edit the /etc/fstab. I attempted to get the Insider Preview builds, but the only channel offered to me is Release Preview and not Dev and the WSL updates are not available on the channel I was offered.
I believe this may be related to #4641 and possibly #4738. I don't recall exactly what was in my /etc/fstab before everything broke (and I can't find any way to access the file since WSL isn't working) but I believe there may be an SSHFS entry to a device that is not currently available on my network.
Expected Behavior
Distribution loads, and I am brought to a command prompt
Actual Behavior
There is a short delay of about 30s and then I receive error message:
Diagnostic Logs
wsl.zip
The text was updated successfully, but these errors were encountered: