Skip to content
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

Please help. Followed instructions but corrupted my Ubuntu 20.04 and can't get back in #8

Open
ericlief opened this issue Jul 6, 2020 · 4 comments

Comments

@ericlief
Copy link

ericlief commented Jul 6, 2020

On step 4 I substituted 2004 for 18004 and got this error:

wsl --shutdown
ubuntu2004.exe config --default-user root
Error: 0x80070057 The parameter is incorrect.

I have tried restarting but can't get back in to undo the changes I made.

@itsabadcode
Copy link

itsabadcode commented Jul 8, 2020

Go to %appdata%\..\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\etc\passwd
and change shell command for user to default /bin/bash
Also you can run wsl.exe --user root if you already changed default-user

@ericlief
Copy link
Author

ericlief commented Jul 8, 2020

@itsabadcode . Unfortunately I have tried that, and for me, ubuntu is mounted at wsl$, and when I go to edit passwd there and save like above, even with admin privileges it won't allow me to save with notepad.
The files in localstate are only
Mode LastWriteTime Length Name


d----- 6/5/2020 11:01 AM temp
-a---- 7/8/2020 3:19 AM 50345279488 ext4.vhdx
-a---l 6/5/2020 10:51 AM 0 fsserver
and I can't access them here.
The wsl command does not do anything for me.

@MarkL4YG
Copy link

In theory, you could just uninstall the application, delete the package folder and then re-install the app for a clean install.
That is, if that is an option for you, of course.

@SirLouen
Copy link

The default instructions are made for ubuntu1804, which corrupt bash for ubuntu2004
These are the instructions for ubuntu2004
https://github.com/chcoders/wsl2-hacks-ubunutu2004

I haven't been able to recover my ubuntu2004 after following the ubuntu1804 instructions, so had to do a clear reinstall.
I would like to discovery a way to enter some kind of "recovery mode" in WSL like common linux distros. I could not manage to undo changes via \$wsl\Ubuntu-20.04 since most files are write protected 👎

Essentially I was able to backup all the files I had in WSL via \$wsl but had to reinstall all the system from the beginning. I hope I find a way to access a full R/W mode with a recovery system in WSL in the future, because I tend to mess up with system files like these pretty frequently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants