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