This commit is contained in:
Marc Beninca 2023-10-03 09:55:08 +02:00
parent d58afc8226
commit d969810396

View file

@ -246,16 +246,18 @@ function hetzner-rescue-wipe-12-10-10 {
# open # open
echo "${passphrase}" \ echo "${passphrase}" \
| cryptsetup luksOpen '/dev/md/crypt' 'crypt' | cryptsetup luksOpen '/dev/md/crypt' 'crypt'
# pv
pvcreate '/dev/mapper/crypt'
# vg
vgcreate 'crypt' '/dev/mapper/crypt'
#### ####
# vg off
vgchange --activate n 'crypt'
# close # close
cryptsetup luksClose 'crypt' cryptsetup luksClose 'crypt'
} }
function hetzner-rescue-wipe-12-10-10-extra { function hetzner-rescue-wipe-12-10-10-extra {
# pv
pvcreate '/dev/mapper/crypt'
# vg
vgcreate 'crypt' '/dev/mapper/crypt'
# lv swap # lv swap
lvcreate --name 'swap' --size '68719476736b' 'crypt' lvcreate --name 'swap' --size '68719476736b' 'crypt'
# lv data # lv data
@ -264,6 +266,4 @@ function hetzner-rescue-wipe-12-10-10-extra {
mkswap --label 'swap' '/dev/mapper/crypt-swap' mkswap --label 'swap' '/dev/mapper/crypt-swap'
# format data # format data
mkfs.ext4 -L 'data' '/dev/mapper/crypt-data' mkfs.ext4 -L 'data' '/dev/mapper/crypt-data'
# vg off
vgchange --activate n 'crypt'
} }