From 5cf0d4021ea1f5755758de30c69d0d4398a57b9a Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 12 Nov 2024 19:45:47 +0100 Subject: [PATCH] partitions --- bash/rescue-hetzner.sh | 31 ++++++++----------------------- bash/rescue-ovh.sh | 31 ++++++++----------------------- 2 files changed, 16 insertions(+), 46 deletions(-) diff --git a/bash/rescue-hetzner.sh b/bash/rescue-hetzner.sh index b4cf60a..4536e47 100644 --- a/bash/rescue-hetzner.sh +++ b/bash/rescue-hetzner.sh @@ -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 # diff --git a/bash/rescue-ovh.sh b/bash/rescue-ovh.sh index ea71bcf..c267929 100644 --- a/bash/rescue-ovh.sh +++ b/bash/rescue-ovh.sh @@ -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"