Skip to content

Instantly share code, notes, and snippets.

@saltera
Created August 23, 2021 19:11
Show Gist options
  • Save saltera/97dd6398fe5940fb2a0cc21110dbd228 to your computer and use it in GitHub Desktop.
Save saltera/97dd6398fe5940fb2a0cc21110dbd228 to your computer and use it in GitHub Desktop.
dislocker.sh
# Install dislocker
sudo apt update
sudo apt install 'dislocker'
# Identify the target partition
lsblk
# Unlock bitlocker and mount the virtual partition
# Change /dev/sdx1
mkdir --parents '/media/bitlockerloop'
sudo dislocker \
--volume '/dev/nvme0n1p3' \
--recovery-password="$RECOVERY_KEY" \
-- '/media/bitlockerloop'
sudo ls '/media/windows'
# Mount the ntfs partition readonly
mkdir --parents '/media/windows'
sudo mount \
--type 'ntfs-3g' \
--options loop,r \
'/media/bitlockerloop/dislocker-file' \
'/media/windows'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment