From fb02c729768cb1e3044090923e10082997783a1d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 1 Jan 2024 11:37:44 +0100 Subject: [PATCH] md/boot --- bash/hetzner-rescue.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/bash/hetzner-rescue.sh b/bash/hetzner-rescue.sh index c6c4fe5..d437a8b 100644 --- a/bash/hetzner-rescue.sh +++ b/bash/hetzner-rescue.sh @@ -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'