wipes
This commit is contained in:
parent
3b2df8f8a0
commit
378e0e530f
3 changed files with 9 additions and 14 deletions
|
@ -37,8 +37,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
||||||
echo
|
echo
|
||||||
echo "#${number}: ${device}4"
|
echo "#${number}: ${device}4"
|
||||||
# wipe bios
|
# wipe bios
|
||||||
dd \
|
fs_wipe "${device}4"
|
||||||
if="/dev/zero" of="${device}4"
|
|
||||||
done
|
done
|
||||||
#
|
#
|
||||||
number=0
|
number=0
|
||||||
|
@ -47,8 +46,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
||||||
echo
|
echo
|
||||||
echo "#${number}: ${device}3"
|
echo "#${number}: ${device}3"
|
||||||
# format esp
|
# format esp
|
||||||
dd \
|
fs_wipe "${device}3" "1M"
|
||||||
if="/dev/zero" of="${device}3" bs="1M"
|
|
||||||
fs_make_fat "${device}3" "esp-${number}" "0000000${number}"
|
fs_make_fat "${device}3" "esp-${number}" "0000000${number}"
|
||||||
# mount esp
|
# mount esp
|
||||||
mkdir --parents "/media/esp/${number}"
|
mkdir --parents "/media/esp/${number}"
|
||||||
|
@ -61,8 +59,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
||||||
echo
|
echo
|
||||||
echo "#${number}: ${device}2"
|
echo "#${number}: ${device}2"
|
||||||
# wipe boot
|
# wipe boot
|
||||||
dd status="progress" \
|
fs_wipe "${device}2" "1G" 1
|
||||||
if="/dev/zero" of="${device}2" bs="1G" count=1
|
|
||||||
done
|
done
|
||||||
#
|
#
|
||||||
members=()
|
members=()
|
||||||
|
@ -95,8 +92,7 @@ rescue_wipe_0_init_hetzner_8_8() {
|
||||||
echo
|
echo
|
||||||
echo "#${number}: ${device}1"
|
echo "#${number}: ${device}1"
|
||||||
# wipe crypt head
|
# wipe crypt head
|
||||||
dd status="progress" \
|
fs_wipe "${device}1" "1G" 1
|
||||||
if="/dev/zero" of="${device}1" bs="1G" count=1
|
|
||||||
done
|
done
|
||||||
#
|
#
|
||||||
members=()
|
members=()
|
||||||
|
|
|
@ -18,16 +18,16 @@ rescue_wipe_0_init_ovh_vle2() {
|
||||||
mkpart bios 1 2 \
|
mkpart bios 1 2 \
|
||||||
set 4 bios_grub on
|
set 4 bios_grub on
|
||||||
# bios / wipe
|
# bios / wipe
|
||||||
dd if="/dev/zero" of="${device}4"
|
fs_wipe "${device}4"
|
||||||
# esp / wipe
|
# esp / wipe
|
||||||
dd if="/dev/zero" of="${device}3" bs="1M"
|
fs_wipe "${device}3" "1M"
|
||||||
# esp / format
|
# esp / format
|
||||||
fs_make_fat "${device}3" "esp" "00000001"
|
fs_make_fat "${device}3" "esp" "00000001"
|
||||||
# esp / mount
|
# esp / mount
|
||||||
mkdir --parents "/media/esp"
|
mkdir --parents "/media/esp"
|
||||||
mount "${device}3" "/media/esp"
|
mount "${device}3" "/media/esp"
|
||||||
# boot / wipe
|
# boot / wipe
|
||||||
dd status="progress" if="/dev/zero" of="${device}2" bs="1G" count=1
|
fs_wipe "${device}2" "1G" 1
|
||||||
# boot / format
|
# boot / format
|
||||||
mkfs.btrfs --force \
|
mkfs.btrfs --force \
|
||||||
--checksum "sha256" \
|
--checksum "sha256" \
|
||||||
|
@ -39,7 +39,7 @@ rescue_wipe_0_init_ovh_vle2() {
|
||||||
mount --options "autodefrag,compress-force=zstd" \
|
mount --options "autodefrag,compress-force=zstd" \
|
||||||
"${device}2" "/media/boot"
|
"${device}2" "/media/boot"
|
||||||
# crypt / wipe
|
# crypt / wipe
|
||||||
dd status="progress" if="/dev/zero" of="${device}1" bs="1G" count=1
|
fs_wipe "${device}1" "1G" 1
|
||||||
# crypt / encrypt
|
# crypt / encrypt
|
||||||
echo "${passphrase}" |
|
echo "${passphrase}" |
|
||||||
cryptsetup \
|
cryptsetup \
|
||||||
|
|
|
@ -103,8 +103,7 @@ source \"/etc/bash/main.sh\" ; rescue_configure \"${hostname}\""
|
||||||
}
|
}
|
||||||
|
|
||||||
rescue_wipe_1_zero() {
|
rescue_wipe_1_zero() {
|
||||||
dd status="progress" \
|
fs_wipe "/dev/mapper/crypt" "512M"
|
||||||
if="/dev/zero" of="/dev/mapper/crypt" bs="512M"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rescue_wipe_3_close() {
|
rescue_wipe_3_close() {
|
||||||
|
|
Loading…
Reference in a new issue