diff --git a/bash/hetzner-rescue.sh b/bash/hetzner-rescue.sh index 2dc00e3..7cde848 100644 --- a/bash/hetzner-rescue.sh +++ b/bash/hetzner-rescue.sh @@ -136,13 +136,14 @@ function hetzner-rescue-wipe-12-10-10 { '/dev/sda' '/dev/sdb' ) - local number=0 + local number local unit='mib' # lsblk echo -n 'WIPE' "${device}" '/?\ OR CANCEL /!\' read # + number=0 for device in "${devices[@]}" ; do ((number++)) echo ; echo "#${number}: ${device}" @@ -162,8 +163,20 @@ function hetzner-rescue-wipe-12-10-10 { parted "${device}" unit "${unit}" \ mkpart "bios-${number}" 1 2 parted "${device}" set 4 bios_grub on + done + # + number=0 + for device in "${devices[@]}" ; do + ((number++)) + echo ; echo "#${number}: ${device}" # wipe bios dd if='/dev/zero' of="${device}4" + done + # + number=0 + for device in "${devices[@]}" ; do + ((number++)) + echo ; echo "#${number}: ${device}" # format esp dd if='/dev/zero' of="${device}3" mkfs.vfat -F 32 -n "esp-${number}" "${device}3"