↕
This commit is contained in:
parent
6be681d0fb
commit
7bce373af6
1 changed files with 8 additions and 6 deletions
14
bash/fs.sh
14
bash/fs.sh
|
@ -78,20 +78,22 @@ fs_wipe() {
|
||||||
}
|
}
|
||||||
|
|
||||||
luks_format() {
|
luks_format() {
|
||||||
local device="${1}"
|
local passphrase="${1}"
|
||||||
local passphrase="${2}"
|
local device="${2}"
|
||||||
|
local label="${3}"
|
||||||
|
local uuid="${4}"
|
||||||
if [ -b "${device}" ]; then
|
if [ -b "${device}" ]; then
|
||||||
echo "${passphrase}" |
|
echo "${passphrase}" |
|
||||||
cryptsetup \
|
cryptsetup \
|
||||||
--verbose \
|
|
||||||
--batch-mode \
|
--batch-mode \
|
||||||
--type "luks2" \
|
|
||||||
--pbkdf "argon2id" \
|
|
||||||
--cipher "aes-xts-plain64" \
|
--cipher "aes-xts-plain64" \
|
||||||
|
--hash "sha512" \
|
||||||
--iter-time 4096 \
|
--iter-time 4096 \
|
||||||
--key-size 512 \
|
--key-size 512 \
|
||||||
--hash "sha512" \
|
--pbkdf "argon2id" \
|
||||||
|
--type "luks2" \
|
||||||
--use-random \
|
--use-random \
|
||||||
|
--verbose \
|
||||||
luksFormat \
|
luksFormat \
|
||||||
"${device}"
|
"${device}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue