From 71f0ef08567add6312feec1921027b7eff9b2d44 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 3 Oct 2023 10:11:41 +0200 Subject: [PATCH] crypt --- bash/hetzner-rescue.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bash/hetzner-rescue.sh b/bash/hetzner-rescue.sh index c710da4..8aae4d3 100644 --- a/bash/hetzner-rescue.sh +++ b/bash/hetzner-rescue.sh @@ -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' }