56

How could I mount my BitLocker encrypted drive on Ubuntu?

I have checked the Wine website, and it had no BitLocker support, and I have no idea how to install Dislocker on my computer.

I can not remove the encryption because my school computers use Windows OS instead of Linux OS. Also because I installed Ubuntu because my Windows OS was not working.

Flimm
  • 44,031
Neugdae
  • 685

7 Answers7

61

Since Ubuntu 18.04, Dislocker is available in the Ubuntu Universe packages. It can be installed using

sudo apt install dislocker

You may need to

sudo add-apt-repository universe
sudo apt update

First, we make two folders, /media/bitlocker and /media/mount:

sudo mkdir /media/bitlocker /media/mount

Then, download and then extract Dislocker.

You'll want to install some needed packages:

sudo apt-get install libfuse-dev

To install it, we need to change directory to the dislocker folder:

cd dislocker

Depending on your operating system, you'll need to choose one of these:

  • For Debian-like distos based on Debian Jessie or Ubuntu 14.04 or older:

     aptitude install gcc cmake make libfuse-dev libpolarssl-dev ruby-dev
    
  • For Debian-like distos based on Debian Stretch or Ubuntu 16.04 or later:

     aptitude install gcc cmake make libfuse-dev libmbedtls-dev ruby-dev
    

Now we finally install dislocker:

cmake .
make
sudo make install

Here, we need to find our partition so we dont erase all of our drives accidentally:

sudo fdisk -l

If we have a recovery password, we can decrypt it using this:

sudo dislocker -r -V /dev/sdaX -p 1536987-000000-000000-000000-000000-000000-000000-000000 -- /media/bitlocker

PS: You should replace 1536987-000000-000000-000000-000000-000000-000000-000000 with your recovery password.

If you know your password, we can just use that too:

sudo dislocker -r -V /dev/sdaX -u yourPassword -- /media/bitlocker

If your disk is mounted to sdb, use option sdb1.

If you are decrypting with a recovery file then use "path/to/.BEK" instead:

sudo dislocker-fuse -V /dev/sdcX -f /media/user/usb-drive/00000000-0X0X-0XX0-XXX0-XXXX0XXX00XX.BEK -- /media/bitlocker

Now, we finally mount our file:

sudo -i
cd /media/bitlocker
mount -r -o loop dislocker-file /media/mount

(If the mount above fails with "Permission denied" add the -r option and try again.)

Now you can move to the /media/mount folder and see your decrypted data.

Read the source for more information and details.

Maythux
  • 87,123
8

You need Dislocker to use BitLocker-encrypted drives. You can download it from here or there is a GitHub repository also.

To install it you will need:

  • A compiler, GCC or Clang;
  • Make (or gmake, for FreeBSD)
  • Headers for FUSE;
  • Headers for PolarSSL;
  • A partition encrypted with BitLocker, from Windows Vista, 7 or 8.

For detailed instructions, see this page or refer to install.txt file in the downloaded Dislocker archive.

Ron
  • 20,938
6

Very good tutorial, however there's one problem. Since the file is read only you will need to use the read-only flag:

mount -ro loop dislocker-file /media/mount

Also the -u (--user-password) option to make this much easier:

sudo dislocker -r -V /dev/sdaX -u -- /media/mount
Enter the user password:▯ 

If you want to mount again in the same folder use:

sudo dislocker -r -V /dev/sdaX -u -- -o nonempty /media/mount

(Where X should be replaced by the number of your encrypted drive, e.g. /dev/sda7)

technop
  • 61
  • 1
  • 2
3

Modern versions of Ubuntu/Kubuntu can decrypt BitLocker partitions without extra software.

At least, I've tested in Kubuntu 22.04 (and everything is fine).

gabeweb
  • 573
  • 2
  • 5
  • 10
3

Warning: Answer only works for Ubuntu 22.04 (Jammy) and newer

cryptsetup added BitLocker experimental support in version 2.3 (Jammy package is v2.4.x), and that support was mature by version 2.6 (Mantic package is v2.6.1) (ref. Ubuntu packages).

The basic structure of usage is to create a decrypted mapped device of the encrypted partition with cryptsetup, and then mount that mapper device with mount:

Install cryptsetup in case it isn't already installed:
$ sudo apt install cryptsetup
Create the mapped decrypted device
$ sudo cryptsetup open --type bitlk /dev/sda3 win11 
Enter passphrase for /dev/sda3:    <<< VOLUME KEY TO BE INPUT HERE
Mount the mapped device
$ sudo mount /dev/mapper/win11 /media/win11/

Please note that the target directory should exist.

Note: Microsoft's documentation on finding the Volume Key is here.

Samveen
  • 288
0

I installed dislocker recently and running the script cmake . triggered errors on trying to find polarssl despite it being installed.

By chance, I eventually managed to install it: you should not run cmake under /dislocker/src directory as mentioned in the first reply (maybe it worked in the past) but should:

cd /dislocker
cmake .
Fabby
  • 35,017
0

the new package name for libpolarssl is: libmbedtls-dev

so you can install the libpolarssl compoments for cmake by installing it:

apt-get install libmbedtls-dev

Then cname and everything else will work fine

stevel
  • 1