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/sda'
|
||||||
'/dev/sdb'
|
'/dev/sdb'
|
||||||
)
|
)
|
||||||
local number=0
|
local number
|
||||||
local unit='mib'
|
local unit='mib'
|
||||||
#
|
#
|
||||||
lsblk
|
lsblk
|
||||||
echo -n 'WIPE' "${device}" '/?\ OR CANCEL /!\'
|
echo -n 'WIPE' "${device}" '/?\ OR CANCEL /!\'
|
||||||
read
|
read
|
||||||
#
|
#
|
||||||
|
number=0
|
||||||
for device in "${devices[@]}" ; do
|
for device in "${devices[@]}" ; do
|
||||||
((number++))
|
((number++))
|
||||||
echo ; echo "#${number}: ${device}"
|
echo ; echo "#${number}: ${device}"
|
||||||
|
@ -162,8 +163,20 @@ function hetzner-rescue-wipe-12-10-10 {
|
||||||
parted "${device}" unit "${unit}" \
|
parted "${device}" unit "${unit}" \
|
||||||
mkpart "bios-${number}" 1 2
|
mkpart "bios-${number}" 1 2
|
||||||
parted "${device}" set 4 bios_grub on
|
parted "${device}" set 4 bios_grub on
|
||||||
|
done
|
||||||
|
#
|
||||||
|
number=0
|
||||||
|
for device in "${devices[@]}" ; do
|
||||||
|
((number++))
|
||||||
|
echo ; echo "#${number}: ${device}"
|
||||||
# wipe bios
|
# wipe bios
|
||||||
dd if='/dev/zero' of="${device}4"
|
dd if='/dev/zero' of="${device}4"
|
||||||
|
done
|
||||||
|
#
|
||||||
|
number=0
|
||||||
|
for device in "${devices[@]}" ; do
|
||||||
|
((number++))
|
||||||
|
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"
|
||||||
|
|
Loading…
Reference in a new issue