This commit is contained in:
Marc Beninca 2023-10-03 09:44:16 +02:00
parent a5cf152c80
commit f71653e290

View file

@ -136,6 +136,7 @@ function hetzner-rescue-wipe-12-10-10 {
'/dev/sda'
'/dev/sdb'
)
local members
local number
local unit='mib'
#
@ -192,6 +193,32 @@ function hetzner-rescue-wipe-12-10-10 {
# wipe boot
dd if='/dev/zero' of="${device}2" bs='1G' status='progress'
done
#
members=()
for device in "${devices[@]}" ; do
members+=("${device}2")
done
mdadm \
--create '/dev/md/boot' \
--name 'boot' \
--uuid '6234a0eb:29a3a847:1dbd5ec4:bada5579' \
--metadata 1 \
--level 0 \
--raid-devices ${#devices[@]} \
"${members[@]}"
#
members=()
for device in "${devices[@]}" ; do
members+=("${device}1")
done
mdadm \
--create '/dev/md/crypt' \
--name 'crypt' \
--uuid '006234a0:eb29a3a8:471dbd5e:c4bada55' \
--metadata 1 \
--level 0 \
--raid-devices ${#devices[@]} \
"${members[@]}"
}
function hetzner-rescue-wipe-12-10-10-extra {