sodcalculator

10 Tech How-To

Access BitLocker in Ubuntu Linux: Full Guide

Guide 10-56165 · Updated · Step by step

To access a BitLocker-encrypted drive in Ubuntu, you use the dislocker tool, which decrypts the drive and lets you mount it like a normal filesystem. This guide covers installing dislocker, mounting a BitLocker partition with a password or recovery key, and troubleshooting common issues.

What Is BitLocker and Why Does It Matter on Linux?

BitLocker is Microsoft’s full-disk encryption feature built into Windows Pro and Enterprise editions. It protects data at rest by encrypting the entire drive, so if the drive is removed from the computer, the data is unreadable without the correct key. Linux does not natively support BitLocker, so you need a third-party tool to read or write to such drives. The most reliable open-source solution is dislocker, which has been actively maintained and supports both the older BitLocker and the newer BitLocker-to-Go formats.

How BitLocker Encryption Works

BitLocker uses AES encryption (128 or 256-bit) with a key that is itself protected by one or more key protectors. These can be a password, a recovery key (a 48-digit number), a TPM chip on the motherboard, or a smart card. On a Windows machine, the TPM automatically unlocks the drive at boot. On Linux, you cannot use the TPM directly, so you must supply a password or recovery key manually. Dislocker reads the BitLocker metadata on the drive, uses the provided key to decrypt the master key, and then presents a decrypted virtual device that you can mount.

Installing Dislocker on Ubuntu

Dislocker is available in the official Ubuntu repositories. To install it, open a terminal and run:

  1. Update your package list: sudo apt update
  2. Install dislocker: sudo apt install dislocker

If you are on a Debian-based distribution other than Ubuntu, the package name is the same. For Fedora, use sudo dnf install dislocker, and for Arch, sudo pacman -S dislocker. After installation, verify it with dislocker --version.

Mounting a BitLocker Drive with a Password

Assuming you have a BitLocker partition (for example, /dev/sdb1) and you know the password, follow these steps:

  1. Create a mount point for the decrypted data: sudo mkdir /mnt/bitlocker
  2. Create a directory where dislocker will place the virtual decrypted file: sudo mkdir /mnt/decrypted
  3. Run dislocker with the password. You can either type it interactively (safer) or pass it in the command (less safe, but useful for scripts):
    • Interactive: sudo dislocker /dev/sdb1 -u -- /mnt/decrypted — you will be prompted for the password.
    • Non-interactive (visible in shell history): sudo dislocker /dev/sdb1 -p'YourPassword' -- /mnt/decrypted
  4. After dislocker runs, you will see a file named dislocker-file inside /mnt/decrypted. That file is actually the decrypted filesystem. Mount it: sudo mount -o loop /mnt/decrypted/dislocker-file /mnt/bitlocker
  5. Access your files at /mnt/bitlocker. When done, unmount with sudo umount /mnt/bitlocker and then sudo umount /mnt/decrypted (or just reboot).

Using a Recovery Key Instead of a Password

If you forgot the password but have the 48-digit recovery key, use the -r option instead of -u:

sudo dislocker /dev/sdb1 -r'123456-123456-123456-123456-123456-123456-123456-123456' -- /mnt/decrypted

Then mount the resulting dislocker-file as above. The recovery key is often printed when BitLocker is enabled or stored in your Microsoft account. If you lose both the password and the recovery key, the data is effectively unrecoverable — that is by design.

Common Problems and How to Fix Them

Here are typical issues you may encounter and their solutions:

  • “Unable to open the device” — Make sure the partition is not mounted elsewhere and that you have read/write permissions (use sudo). Also check that the device path is correct: lsblk shows all disks and partitions.
  • “No BitLocker metadata found” — The partition might not be BitLocker-encrypted, or it is a system drive with TPM-only protection. If the drive came from a Windows machine with TPM, you may need to use the recovery key because the TPM key is not available.
  • Mount fails with “wrong fs type” — After dislocker creates the dislocker-file, you must mount that file with the loop option, not the original partition. Also ensure you have the ntfs-3g package installed for NTFS drives: sudo apt install ntfs-3g.
  • Read-only mount — BitLocker drives are often NTFS. If you get a read-only mount, it may be due to NTFS journal issues. Unmount cleanly and try again, or use ntfsfix on the decrypted file (but back up first).
  • Slow performance — Decryption is CPU-intensive. On large drives, it may take a while to mount. Be patient.

Alternatives and Comparisons

Dislocker is not the only tool. libbde (from the libyal family) is another library that can read BitLocker volumes, but it is less user-friendly. Some commercial tools like Mounty (for macOS) or WinBtrfs (for Windows) are not relevant here. The main alternative is to decrypt the drive on a Windows machine and then copy the data to a Linux-friendly filesystem. That is often simpler if you have access to a Windows PC. However, dislocker is free, open-source, and works well for occasional access. For permanent dual-boot setups, consider using a shared exFAT partition instead of BitLocker for files you need in both OSes.

Safety and Security Considerations

When using dislocker, be aware of a few security points:

  • Typing a password on the command line leaves it in your shell history. Use the interactive -u option or disable history for that command.
  • Dislocker decrypts data on the fly, so the decrypted data is written to the dislocker-file — but that file is a virtual image, not a plaintext copy on disk. However, when you mount it, the files are accessible to any user with access to the mount point. Ensure permissions are set correctly.
  • If you are using a recovery key, treat it like a password — anyone with it can unlock the drive.
  • Do not use dislocker on a drive that is still connected to a running Windows system with BitLocker active; you may cause filesystem corruption.

Frequently Asked Questions

Can I write to a BitLocker drive from Ubuntu?

Yes, dislocker supports both reading and writing. Once you mount the decrypted file, you can copy files to and from it. However, write support may be slower and less stable than on native NTFS, so it is wise to back up important data before making changes.

Do I need to disable Secure Boot to use dislocker?

No, dislocker runs in user space and does not interact with the firmware. Secure Boot does not affect it.

Can I access a BitLocker drive that uses TPM-only protection?

Yes, but only if you have the recovery key. The TPM key is tied to the original hardware, so you cannot use it on a different machine. The recovery key is the only way to unlock such a drive on Linux.

What if my BitLocker drive uses the new XTS-AES encryption?

Dislocker supports XTS-AES, which is the default since Windows 10 version 1511. It also supports the older AES-CBC. You do not need to specify the algorithm; dislocker detects it automatically.

Is dislocker safe to use on an SSD with BitLocker?

Yes, dislocker works the same way on SSDs. However, note that BitLocker on SSDs may use hardware encryption, but dislocker still accesses the drive through the normal block layer, so it works.

Can I mount a BitLocker drive automatically at boot?

Yes, you can add an entry to /etc/fstab using the dislocker-file, but you will need to provide the password or key at boot. This is not recommended for security reasons, as it would store the key in a script or require interactive input. Most users mount manually when needed.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →