To address the issue with your WSL 2 Ubuntu-24.04 distribution failing to start with error code 74, you can attempt the following steps to repair the VHD filesystem and regain access to your data:
- Shutdown all WSL distributions: Open PowerShell as an administrator and run the command:
wsl.exe --shutdown - Mount the VHDX file: Use the following command to mount the VHDX file. Replace
<path-to-ext4.vhdx>with the actual path to your VHDX file:wsl.exe --mount <path-to-ext4.vhdx> --vhd --bare - Identify the block device: After mounting, identify the block device name by running:
wsl.exe lsblk - Repair the filesystem: Use the
e2fsckcommand to check and repair the filesystem. Replace<device>with the block device name you identified (e.g.,sdc):wsl.exe sudo e2fsck -f /dev/<device> - Unmount the disk: Once the repair is complete, unmount the disk using:
wsl.exe --unmount
Please note that if you encounter issues while running these commands, you may need to ensure that Docker Desktop is closed, as it can interfere with the mounting process.
If these steps do not resolve the issue, consider reaching out to Microsoft support for further assistance, especially given the critical nature of the data involved.
References: