Accessing bitlocker encryted drive
Hi,
Is it supported to access files stored in a hard drive that is encrypted with bitlocker?
In my case, the letter appears in /mnt/ and I can even create new files in the encrypted drive from Bash, but I cannot see the files created through windows. Also, from windows I cannot see the files that I created from Bash.
Thanks!
Hi @melonista -- for what it's worth, my C: drive is BitLocker-encrypted, and I can create new files on it and share them between Linux and Windows without (for the most part) any trouble. So this sounds like a bug to me. Could you provide some more details about your setup and some specific examples of commands that don't work for you?
I believe the drive does have to be NTFS-formatted. (I've never tried to use BitLocker with formats other than NTFS, but I assume that Windows otherwise lets you do so?)
It is now working. No idea how or when happended. This is the secondary HD in my laptop, and it is NTFS formated. I just encrypted it using bitlocker (I selected the option of not encrypting the full drive, because it was empty). For some reason I can now access the content and generate new content from bash.
It seems that the issue is that you have to unlock the unit before opening bash.
I had the same issue. In my case, /mnt/e and E:\ seemed to be different worlds - WSL could create files on it that Explorer could no see, and vice-versa. Ejecting the drive, login off WSL, rebooting the computer, nothing would do, both Explorer and WSL would still see completely different things.
Eventually I managed to fix it by deleting /mnt/e and manually mounting the drive in WSL.
I think Microsoft should document what works and doesn't work with WSL and Bitlocker. Currently it's quite random and buggy.
It seems that the issue is that you have to unlock the unit before opening bash.
This issue still exists on wsl2 ;)
And I had to close all wsl terminal windows before the folder would be visible.
As a workaround, you can do "sudo mount -t drvfs -o uid=1000,gid=1000 e: /mnt/e"
This gives me the following error:
$ sudo mount -t drvfs -o uid=1000,gid=1000 drvfs: /mnt/d
mount: /mnt/d: wrong fs type, bad option, bad superblock on drvfs:, missing codepage or helper program, or other error.
<3>init: (16561) ERROR: UtilCreateProcessAndWait:501: /bin/mount failed with status 0x2000
No error information
Okay an upgrade to WSL v2 failed for me, but stopping and restarting worked.
With /etc/wsl.conf:
[automount]
options = case = force
from the guide to enable case sensitivity fails and lets it not mount again. (Same with options = case = dir)