split
This commit is contained in:
parent
7cbe78dbc6
commit
3972d3ce39
1 changed files with 28 additions and 1 deletions
|
@ -129,7 +129,7 @@ else
|
|||
fi
|
||||
}
|
||||
|
||||
function hetzner-rescue-wipe-12-10-10 {
|
||||
function hetzner-rescue-wipe-12-10-10-0 {
|
||||
local device
|
||||
local devices=(
|
||||
'/dev/sdc'
|
||||
|
@ -246,6 +246,33 @@ function hetzner-rescue-wipe-12-10-10 {
|
|||
# open
|
||||
echo "${passphrase}" \
|
||||
| cryptsetup luksOpen '/dev/md/crypt' 'crypt'
|
||||
####
|
||||
# close
|
||||
cryptsetup luksClose 'crypt'
|
||||
}
|
||||
|
||||
function hetzner-rescue-wipe-12-10-10-1 {
|
||||
local passphrase
|
||||
# read passphrase
|
||||
echo -n 'PassPhrase: '
|
||||
read -r -s passphrase
|
||||
# encrypt
|
||||
echo "${passphrase}" \
|
||||
| cryptsetup \
|
||||
--verbose \
|
||||
--batch-mode \
|
||||
--type 'luks2' \
|
||||
--pbkdf 'argon2id' \
|
||||
--cipher 'aes-xts-plain64' \
|
||||
--iter-time 8192 \
|
||||
--key-size 512 \
|
||||
--hash 'sha512' \
|
||||
--use-random \
|
||||
luksFormat \
|
||||
'/dev/md/crypt'
|
||||
# open
|
||||
echo "${passphrase}" \
|
||||
| cryptsetup luksOpen '/dev/md/crypt' 'crypt'
|
||||
# pv
|
||||
pvcreate '/dev/mapper/crypt'
|
||||
# vg
|
||||
|
|
Loading…
Reference in a new issue