If you have a LUKS-encrypted partition on another disk, it's easy to mount it inside WSL.
List your disks:
> wmic diskdrive list briefMount the whole disk inside WSL (using --bare so WSL doesn't attempt to mount it automatically):
> wsl --mount \\.\PHYSICALDRIVE1 --bareNow inside WSL, check the device name of the mounted disk (something like /dev/sd*):
$ dmesg | tailOpen the LUKS device (it'll prompt for your passphrase):
$ sudo cryptsetup luksOpen /dev/sdd3 my-encrypted-diskAnd mount it somewhere:
$ sudo mount /dev/mapper/my-encrypted-disk /somewhereAvoid mounting on /mnt because that's usually used by WSL itself to mount your C: drive.
@nhooyr, @AymaneHrouch looks like
/somewhereneeds to be under/mnt/wsl/such as/mnt/wsl/MyExtDisk. I can access the drive using Windows Explorer by accessing\\wsl.localhost\Ubuntu\mnt\wsl\MyExtDisk.However, the directory under
/mnt/wsl/will be cleared after the reboot, so you'd need to create the directory each time... I'd like to know if there is a better way to do it.