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