Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2798

Why My WSL virtual disk ext4.vhdx comes into 0 KB?

$
0
0

My windows crashed. So I want to access my WSL2 virtual disk to backup some .rc config files in it.(I an using 22.04 LTS now)But I found ext4.vhdx of it is 0kb.

Try to mount

I tried some commands to mount it and not work

sudo modprobe nbd max_part=16ls /dev | grep nbdsudo qemu-img info ext4.vhdxsudo qemu-nbd -c /dev/nbd0 -f <FileFormat> ext4.vhdxsudo partprobe /dev/nbd0sudo fdisk -l /dev/nbd0sudo mount -t ext4 -o rw,exec /dev/nbd0p1 /mnt/WSL

Direct copy Virtual disk

Copy the ext4.vhdx to WSL2 in Another Windows OS run the following and change the current ext.vhdx to the copy one.

wsl --shutdownwslconfig /lwslconfig /u <ServiceName>

when boot The Same Distro version WSL again with moved new ext4.vhdx , I'm in /mount/c/.... It looks like that new ext4.vhdx not be find.


Viewing all articles
Browse latest Browse all 2798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>