- mkfs.ext2 `grub_extdev`
- yes YES | cryptsetup luksFormat `rootdev` $luks_dir/host-$HOSTNAME \
- -c aes-cbc-essiv:sha256 -s 256 || [[ $? == 141 ]]
+ mkfs.ext2 $(grub_extdev)
+ # when we move to newer than trisquel 8, we can remove
+ # --type luks1. We can also check on cryptsetup --help | less /compil
+ # to see about the other settings. Default in debian 9 is luks2.
+ # You can convert from luks2 to luks 1 by adding a temporary key:
+ # cryptsetup luksAddKey --pbkdf pbkdf2
+ # then remove the new format keys with cryptsetup luksRemoveKey
+ # then cryptsetup convert DEV --type luks1, then readd old keys and remove temp.
+ yes YES | cryptsetup luksFormat $(rootdev) $luks_file \
+ --type luks1 -c aes-cbc-essiv:sha256 -s 256 || [[ $? == 141 ]]