Last active
July 4, 2017 20:09
-
-
Save Ortham/0ed48166c00284f9668587e680fad301 to your computer and use it in GitHub Desktop.
A script to simplify mounting a Bitlocker-encrypted Windows partition using Dislocker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run with 'sudo' | |
set -e | |
BITLOCKER_PARTITION=/dev/sda3 | |
BITLOCKER_MOUNT=/mnt/bitlocker | |
DECRYPTED_MOUNT=/mnt/windows | |
echo "Please enter your Bitlocker password: " | |
read -s BITLOCKER_PASSWORD | |
dislocker -V $BITLOCKER_PARTITION -u$BITLOCKER_PASSWORD -- $BITLOCKER_MOUNT | |
mount -o loop,uid=1000,gid=1000,dmask=027,fmask=137 $BITLOCKER_MOUNT/dislocker-file $DECRYPTED_MOUNT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run with 'sudo' | |
set -e | |
BITLOCKER_MOUNT=/mnt/bitlocker | |
DECRYPTED_MOUNT=/mnt/windows | |
umount $BITLOCKER_MOUNT | |
umount $DECRYPTED_MOUNT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment