https://learn.microsoft.com/ja-jp/windows/wsl/wsl2-mount-disk
https://gist.github.com/gtirloni/5b62ad835a06da21a6bd11aa78d3f7c4
(1) List your disks:
> GET-CimInstance -query "SELECT * from Win32_DiskDrive"(2) Mount the whole disk(Use sudo or as admin):
> sudo wsl --mount \\.\PHYSICALDRIVE1 --bare(3) In WSL2, Check the device name of the mounted disk (something like /dev/sd*):
$ lsblk(4) Open the LUKS drive:
$ sudo cryptsetup luksOpen /dev/sdc myLuksDisk(5) Create /mnt/wsl/MyExtDisk dir and mount it:
$ mkdir /mnt/wsl/MyExtDisk
$ sudo mount /dev/mapper/myLuksDisk /mnt/wsl/MyExtDiskAccess it using Explorer.
\\wsl.localhost\Ubuntu-24.04\mnt\wsl\MyExtDisk
Finishing up.
$ sudo umount /mnt/wsl/MyExtDisk> wsl --unmount \\.\PHYSICALDRIVE1NOTE 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.