So, I had installed Ubuntu 20.04 with WSL2, and I've tried to follow some suggested approach to move it (just moving the ext4 hard disk image and creating symlink to the folder, containing it). This did not work, and now I am not able to restore the subsystem even if I move ext4 image to its original location at ~\AppData\Packages\PATH_TO_UBUNTU_DISTRO\LocalState.

I've tried to fixing it by following the instructions at https://github.com/MicrosoftDocs/WSL/issues/412#issuecomment-708142542. I've created a new Ubuntu subsystem, and tried to import my back-up version of the original ext4 to this new Ubuntu. However, now if I try to open the subsystem, it just dies on start-up without reporting any error.

However, when I am trying to follow the last step of the instruction, i.e. to set the default user, I get Error: 0x80070057 The parameter is incorrect., so not really sure if the that image is still usable.

Any ideas of how to proceed now? Is there any way to still link the original ext4 image to the new Ubuntu subsystem, or I should better forget about it? Thanks.

  • The only thing I can suggest is to make sure there is no compression going on in (at the very least) either the directory where the ext4.vhdx file lives nor the %temp% directory. But I suspect the vhdx is corrupt. Did you do a wsl --shutdown (or at least --terminate on the instance) before moving the file? Feb 25 at 18:39
  • Can you move again the content to the ~\AppData\Packages\PATH_TO_UBUNTU_DISTRO\LocalState folder? You may move the distro to other disk, backup or restore using wsl --export and wsl --import. You may find some ideas here
    – Jaime
    Feb 27 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.