This commit is contained in:
Marc Beninca 2024-01-01 11:37:44 +01:00
parent 18fa2453ea
commit fb02c72976

View file

@ -210,17 +210,25 @@ function hetzner-rescue-wipe-8-8-0-init {
for device in "${devices[@]}" ; do
members+=("${device}2")
done
mdadm \
--create '/dev/md/boot' \
--name 'boot' \
--uuid '00000000:00000000:00000000:00000002' \
--metadata 1 \
--level 0 \
--raid-devices ${#devices[@]} \
"${members[@]}"
#
mkfs.btrfs --force \
--checksum 'sha256' \
--label 'boot' \
--uuid '00000000-0000-0000-0000-00000000000b' \
--checksum 'sha256' \
--data 'raid0' \
"${members[@]}"
'/dev/md/boot'
# mount boot
mkdir --parents '/media/boot'
mount \
--options 'autodefrag,compress-force=zstd' \
"${members}" '/media/boot'
'/dev/md/boot' '/media/boot'
#
number=0
for device in "${devices[@]}" ; do
@ -238,7 +246,7 @@ function hetzner-rescue-wipe-8-8-0-init {
mdadm \
--create '/dev/md/crypt' \
--name 'crypt' \
--uuid '00000000:00000000:00000000:00000000' \
--uuid '00000000:00000000:00000000:00000001' \
--metadata 1 \
--level 0 \
--raid-devices ${#devices[@]} \
@ -294,9 +302,9 @@ function hetzner-rescue-wipe-8-8-2-make {
| cryptsetup luksOpen '/dev/md/crypt' 'crypt'
# format crypt
mkfs.btrfs --force \
--checksum 'sha256' \
--label 'crypt' \
--uuid '00000000-0000-0000-0000-00000000000c' \
--checksum 'sha256' \
'/dev/mapper/crypt'
# mount crypt
mkdir --parents '/media/crypt'