Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cryptsetup luksFormat --type=luks2 --integrity hmac-sha256 --sector-size 4096 /dev/sda1
- # For raspberry --cipher="xchacha20,aes-adiantum-plain64" --pbkdf pbkdf2
- # the first because it's fast without hardware AES, the second because the default would require a lot of memory to generate the key from the password. If you already created the key with the default you can convert with the following:
- cryptsetup luksConvertKey --pbkdf pbkdf2 /dev/sda1
- cryptsetup open /dev/sda1 sda1_crypt
- cryptsetup open /dev/sda1 sda1_crypt --allow-discards --persistent #alternative to make discards permanently enabled on this device at the LUKS level.
- mkfs.ext4 -i 4M -O ^64bit -m 0 -L Label /dev/mapper/sda1_crypt
- # For flash -b 4096 -E stride=2,stripe-width=1024
- # -O ^has_journal to disable journal
- cryptsetup close /dev/mapper/sda1_crypt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement