Last active
June 4, 2018 19:17
-
-
Save ibihim/7319295bc99924d8ac4b55913fbf0728 to your computer and use it in GitHub Desktop.
Encrypted Partition creation with cryptsetup
This file contains hidden or 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
# Convert partition to LUKS format | |
sudo cryptsetup --verbose --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 4000 --use-random luksFormat /dev/sdd | |
# Gather information about newly encrypted partition | |
sudo cryptsetup luksDump /dev/sdd | |
# Map partition to device name | |
sudo cryptsetup luksOpen /dev/sdd secrets | |
# Gather information about new device | |
sudo dmsetup info secrets | |
# Partioning to ext4 | |
sudo mkfs.ext4 /dev/mapper/secrets | |
# Mount partition | |
sudo mount /dev/mapper/secrets /mnt | |
# Unmount partition | |
sudo umount /mnt | |
# Close device | |
sudo cryptsetup luksClose secrets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment