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
# Create strong LUKS key | |
openssl genrsa -out /root/luks.key 4096 | |
chmod 400 /root/luks.key | |
# Fill random data to the device | |
shred -v --iterations=1 /dev/xvdb | |
# Format device | |
echo "YES" | cryptsetup luksFormat /dev/xvdb --key-file /root/luks.key |