partitions

This commit is contained in:
Marc Beninca 2024-11-12 19:45:47 +01:00
parent 11c131e849
commit 5cf0d4021e
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 16 additions and 46 deletions

View file

@ -7,7 +7,6 @@ rescue_wipe_0_init_hetzner_8_8() {
local members local members
local number local number
local passphrase local passphrase
local unit="mib"
# read passphrase # read passphrase
passphrase="$(read_passphrase)" passphrase="$(read_passphrase)"
# #
@ -21,28 +20,14 @@ rescue_wipe_0_init_hetzner_8_8() {
echo echo
echo "#${number}: ${device}" echo "#${number}: ${device}"
# #
parted "${device}" \ parted --script "${device}" \
--script \ mktable gpt \
mktable gpt unit "mib" \
# mkpart "crypt-${number}" 33282 7630885 \
parted "${device}" \ mkpart "boot-${number}" 514 33282 \
unit "${unit}" \ mkpart "esp-${number}" 2 514 \
mkpart "crypt-${number}" 33282 7630885 set 3 esp on \
# mkpart "bios-${number}" 1 2 \
parted "${device}" \
unit "${unit}" \
mkpart "boot-${number}" 514 33282
#
parted "${device}" \
unit "${unit}" \
mkpart "esp-${number}" 2 514
parted "${device}" \
set 3 esp on
#
parted "${device}" \
unit "${unit}" \
mkpart "bios-${number}" 1 2
parted "${device}" \
set 4 bios_grub on set 4 bios_grub on
done done
# #

View file

@ -1,7 +1,6 @@
rescue_wipe_0_init_ovh_vle2() { rescue_wipe_0_init_ovh_vle2() {
local device="/dev/sdb" local device="/dev/sdb"
local passphrase local passphrase
local unit="mib"
# read passphrase # read passphrase
passphrase="$(read_passphrase)" passphrase="$(read_passphrase)"
# warn # warn
@ -9,28 +8,14 @@ rescue_wipe_0_init_ovh_vle2() {
printf "%s" "WIPE ${device} /?\\ OR CANCEL /!\\" printf "%s" "WIPE ${device} /?\\ OR CANCEL /!\\"
read -r read -r
# #
parted "${device}" \ parted --script "${device}" \
--script \ mktable gpt \
mktable gpt unit "mib" \
# mkpart "crypt" 4610 40959 \
parted "${device}" \ mkpart "boot" 514 4610 \
unit "${unit}" \ mkpart "esp" 2 514 \
mkpart "crypt" 4610 40959 set 3 esp on \
# mkpart bios 1 2 \
parted "${device}" \
unit "${unit}" \
mkpart "boot" 514 4610
#
parted "${device}" \
unit "${unit}" \
mkpart "esp" 2 514
parted "${device}" \
set 3 esp on
#
parted "${device}" \
unit "${unit}" \
mkpart bios 1 2
parted "${device}" \
set 4 bios_grub on set 4 bios_grub on
# bios / wipe # bios / wipe
dd if="/dev/zero" of="${device}4" dd if="/dev/zero" of="${device}4"