md/boot
This commit is contained in:
parent
18fa2453ea
commit
fb02c72976
1 changed files with 14 additions and 6 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue