number
This commit is contained in:
parent
d9c6a67d40
commit
74a27a077c
1 changed files with 14 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue