How to mount a LUKS encrypted drive in Windows
Yes, you can and you don’t have to fight FreeOTFE. And, although it is not a task as intuitive and transparent as in GNU Linux, you will see that it is relatively simple.
LUKS stands for Linux Unified Key Setup. It is a storage unit encryption specification created by Clemens Fruhwirth, originally developed for GNU Linux systems. While most disk encryption software uses different and incompatible undocumented formats, LUKS specifies a standard, platform-independent format for use by various tools. This not only facilitates compatibility and interoperability between the different programs, but also ensures that all of them provide for password management in a secure place and in a documented manner.
The following procedures require Windows OS Build ≥20211, WSL, and Debian (with the cryptsetup package installed).
In Windows Terminal (admin):
PS C:\Users\miguel> GET-WMIOBJECT -query "SELECT * from Win32_DiskDrive"
It will return something like:
Partitions : 3 DeviceID : \\.\PHYSICALDRIVE0 Model : TOSHIBA THNSNH128GCST Size : 128034708480 Caption : TOSHIBA THNSNH128GCST Partitions : 1 DeviceID : \\.\PHYSICALDRIVE1 Model : TOSHIBA External USB 3.0 USB Device Size : 2000396321280 Caption : TOSHIBA External USB 3.0 USB Device
I mount the encrypted external drive:
PS C:\Users\miguel> wsl --mount \\.\PHYSICALDRIVE1 --bare
Now, in Debian (note: In the Debian-specific terminal, not in an open Debian tab in Windows Terminal) I find out the name of the disk and its partition:
I open the encrypted partition and give it a name:
$ sudo cryptsetup luksOpen /dev/sdc1 TOSHIBA2TB
And finally I mount the partition (I first create the directory in which to mount it):
$ sudo mount /dev/mapper/TOSHIBA2TB /mnt/TOSHIBA2TB/
To unmount, in the Debian terminal:
$ sudo umount /mnt/TOSHIBA2TB/
I close the encrypted partition:
$ sudo cryptsetup luksClose TOSHIBA2TB
In Windows Terminal (admin) I unmount the drive:
PS C:\Users\miguel> wsl --unmount \\.\PHYSICALDRIVE1
Sources: Wikipedia and own elaboration.