Skip to content

Instantly share code, notes, and snippets.

@fiddyschmitt
Last active March 13, 2024 23:53
Show Gist options
  • Save fiddyschmitt/2ff72b7203855e085cc2862ff49841fa to your computer and use it in GitHub Desktop.
Save fiddyschmitt/2ff72b7203855e085cc2862ff49841fa to your computer and use it in GitHub Desktop.
Mount or Extract Bitlocker image
--Raw image to VHD
./VBoxManage convertdd nvme1n1p4.img nvme1n1p4.vhd --format VHD
or
./qemu-img.exe convert -f raw -O vpc "vme1n1p4.img" "nvme1n1p4-qemu.vhd"
--To remove bitlocker
• Using Computer Management, mount the VHD as a drive letter
• Git bash
touch .\nvme1n1p4-vboxmanage_unbitlockered_sparse.img
fsutil sparse setflag .\nvme1n1p4-vboxmanage_unbitlockered_sparse.img
//sparse
cp --sparse=always /dev/sdc1 nvme1n1p4-qemu_unbitlockered_sparse.img
dd if=/dev/sdc1 bs=100MB status=progress >> nvme1n1p4-qemu_unbitlockered_sparse.img
dd if=/dev/sdc1 of=nvme1n1p4-qemu_unbitlockered_sparse.img conv=sparse bs=1MB oflag=append status=progress
dd if=/dev/sdc1 conv=sparse bs=1MB oflag=append status=progress >> nvme1n1p4-qemu_unbitlockered_sparse.img
//non-sparse
dd if=/dev/sdc1 of=nvme1n1p4-qemu_unbitlockered.img bs=10MB status=progress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment