WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Error 0x80070040 when you remove resolv.conf

Open icorne opened this issue 10 years ago • 8 comments

My resolv.conf wasn't updating properly, so I removed it, in the hopes it would regenerate. I understand that this is not the smartest action plan, but now I cannot start bash anymore:

C:\Users\Ian.Corne>bash
Error: 0x80070040

icorne avatar Apr 13 '16 06:04 icorne

Thanks for reporting the issue. Did you delete /etc/resolv.conf (the symlink) or /run/resolvconf/resolv.conf (the target)? I assume it was /etc/resolv.conf but wanted to confirm.

stehufntdev avatar Apr 13 '16 14:04 stehufntdev

I deleted the symlink.

icorne avatar Apr 13 '16 19:04 icorne

@icorne If you want, you can just wipe out the old WSL installation and start from scratch. See the instructions on how to fully uninstall in the FAQ. Then you can start fresh by typing bash.

sunilmut avatar Apr 14 '16 05:04 sunilmut

Yes, I believe uninstall and reinstall is the best recovery at this point. For now please avoid removing system files, and I filed a bug on our end to see if this can be more resilient.

stehufntdev avatar Apr 14 '16 13:04 stehufntdev

I've decided to recreate the /etc/resolv.conf symlink if it does not exist. This change will be coming to a Windows Insider preview sometime in the future. Until then be careful about deleting the /etc/resolv.conf symlink because it will require you to reinstall WSL.

benhillis avatar May 20 '16 21:05 benhillis

This is the same issue as #62.

benhillis avatar May 21 '16 21:05 benhillis

Fix appears to be in the Windows Insider Fast ring.

russalex avatar Jun 10 '16 20:06 russalex

#62

m5lil avatar Jan 02 '18 09:01 m5lil