This commit is contained in:
Marc Beninca 2023-10-03 10:11:41 +02:00
parent 3972d3ce39
commit 71f0ef0856

View file

@ -178,7 +178,8 @@ function hetzner-rescue-wipe-12-10-10-0 {
((number++))
echo ; echo "#${number}: ${device}"
# wipe bios
dd if='/dev/zero' of="${device}4"
dd \
if='/dev/zero' of="${device}4"
done
#
number=0
@ -186,7 +187,8 @@ function hetzner-rescue-wipe-12-10-10-0 {
((number++))
echo ; echo "#${number}: ${device}"
# format esp
dd if='/dev/zero' of="${device}3"
dd \
if='/dev/zero' of="${device}3"
mkfs.vfat -F 32 -n "esp-${number}" "${device}3"
done
#
@ -195,7 +197,8 @@ function hetzner-rescue-wipe-12-10-10-0 {
((number++))
echo ; echo "#${number}: ${device}"
# wipe boot
dd if='/dev/zero' of="${device}2" bs='1G' status='progress'
dd status='progress' \
if='/dev/zero' of="${device}2" bs='1G'
done
#
members=()
@ -246,7 +249,9 @@ function hetzner-rescue-wipe-12-10-10-0 {
# open
echo "${passphrase}" \
| cryptsetup luksOpen '/dev/md/crypt' 'crypt'
####
# wipe crypt
dd status='progress' \
if='/dev/zero' of='/dev/mapper/crypt' bs='16G'
# close
cryptsetup luksClose 'crypt'
}