Wsl2 restore after formatting windows
Hey guys, how to restore wsl2 after formatting windows?
After formatting only ext4.vhdx is there but distro won't be erased coz windows is formatted, there's important files there and I don't want to lose it I would be thankful if somebody told me a solution
Additional information:
- ext4 disk is in D drive not c
- ext4 and distro size is already expanded to 920 gb
- using Ubuntu 22.04 (in distro itself version is 23.04)
So to clarify you have the vhd that contains the distro? If so you can use:
--import-in-place <Distro> <FileName>
Imports the specified .vhdx file as a new distribution.
This virtual hard disk must be formatted with the ext4 filesystem type.
You may then need to change your default user via /etc/wsl.conf
[user]
default=username
So to clarify you have the vhd that contains the distro? If so you can use:
--import-in-place <Distro> <FileName> Imports the specified .vhdx file as a new distribution. This virtual hard disk must be formatted with the ext4 filesystem type.You may then need to change your default user via /etc/wsl.conf
[user] default=username
Ok thx
Closing since the issue seems resolved.