Created
September 29, 2018 20:30
-
-
Save thbkrkr/8e819a7d779ca1f8797254829c319364 to your computer and use it in GitHub Desktop.
crypt
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
#!/bin/bash -eu | |
name=cslash device=/dev/nvme0n1p5 | |
sudo cryptsetup -c aes-xts-plain64 --hash sha512 --key-size 512 luksFormat -v $device | |
sudo cryptsetup luksOpen $device $name | |
sudo mkfs.ext4 -m 0 /dev/mapper/$name | |
echo "$name $device none luks,timeout=30" | sudo tee -a /etc/crypttab | |
echo "/dev/mapper/$name / ext4 errors=remount-ro 0 1" | sudo tee -a /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment