mkfs
This commit is contained in:
parent
c00ceaacaf
commit
874dd04672
1 changed files with 10 additions and 15 deletions
|
@ -186,7 +186,11 @@ function hetzner-rescue-wipe-8-8-0 {
|
||||||
# format esp
|
# format esp
|
||||||
dd \
|
dd \
|
||||||
if='/dev/zero' of="${device}3" bs='1M'
|
if='/dev/zero' of="${device}3" bs='1M'
|
||||||
mkfs.vfat -F 32 -n "esp-${number}" "${device}3"
|
mkfs.vfat \
|
||||||
|
-F 32 \
|
||||||
|
-S 4096 \
|
||||||
|
-n "esp-${number}" \
|
||||||
|
"${device}3"
|
||||||
done
|
done
|
||||||
#
|
#
|
||||||
number=0
|
number=0
|
||||||
|
@ -195,20 +199,17 @@ function hetzner-rescue-wipe-8-8-0 {
|
||||||
echo ; echo "#${number}: ${device}2"
|
echo ; echo "#${number}: ${device}2"
|
||||||
# wipe boot
|
# wipe boot
|
||||||
dd status='progress' \
|
dd status='progress' \
|
||||||
if='/dev/zero' of="${device}2" bs='1G'
|
if='/dev/zero' of="${device}2" bs='1G' count=1
|
||||||
done
|
done
|
||||||
#
|
#
|
||||||
members=()
|
members=()
|
||||||
for device in "${devices[@]}" ; do
|
for device in "${devices[@]}" ; do
|
||||||
members+=("${device}2")
|
members+=("${device}2")
|
||||||
done
|
done
|
||||||
mdadm \
|
mkfs.btrfs --force \
|
||||||
--create '/dev/md/boot' \
|
--label 'boot' \
|
||||||
--name 'boot' \
|
--checksum 'sha256' \
|
||||||
--uuid '6234a0eb:29a3a847:1dbd5ec4:bada5579' \
|
--data 'raid0' \
|
||||||
--metadata 1 \
|
|
||||||
--level 0 \
|
|
||||||
--raid-devices ${#devices[@]} \
|
|
||||||
"${members[@]}"
|
"${members[@]}"
|
||||||
#
|
#
|
||||||
number=0
|
number=0
|
||||||
|
@ -232,12 +233,6 @@ function hetzner-rescue-wipe-8-8-0 {
|
||||||
--level 0 \
|
--level 0 \
|
||||||
--raid-devices ${#devices[@]} \
|
--raid-devices ${#devices[@]} \
|
||||||
"${members[@]}"
|
"${members[@]}"
|
||||||
# format boot
|
|
||||||
mkfs.ext4 \
|
|
||||||
-F \
|
|
||||||
-L 'boot' \
|
|
||||||
-U '6234a0eb-29a3-a847-1dbd-5ec4bada5579' \
|
|
||||||
'/dev/md/boot'
|
|
||||||
# encrypt
|
# encrypt
|
||||||
echo "${passphrase}" \
|
echo "${passphrase}" \
|
||||||
| cryptsetup \
|
| cryptsetup \
|
||||||
|
|
Loading…
Reference in a new issue