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

View file

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