Skip to content

Commit b58bed9

Browse files
committed
Improve LUKS
Signed-off-by: Bensuperpc <[email protected]>
1 parent 320a286 commit b58bed9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

partition/luks.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ fi
3535
if (( $# == 2 )); then
3636
UUID=$(uuidgen)
3737
echo "UUID: ${UUID}"
38-
umount $1 || true
38+
sudo umount $1 || true
3939
sudo cryptsetup -v --type luks --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 1000 --use-urandom --verify-passphrase luksFormat --label=$2 $1
40-
sudo cryptsetup luksOpen $1 ${UUID}
40+
sudo cryptsetup -v luksOpen $1 ${UUID}
4141
sudo mkfs.btrfs --force --checksum crc32c --label $2 /dev/mapper/${UUID}
42-
sudo cryptsetup luksClose ${UUID}
42+
43+
sudo cryptsetup -v luksClose ${UUID}
4344
echo "Partition: OK"
4445
echo "Now you can unplug, replug device and use it :) "
4546
else

0 commit comments

Comments
 (0)