partitions
This commit is contained in:
parent
11c131e849
commit
5cf0d4021e
2 changed files with 16 additions and 46 deletions
|
@ -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
|
||||||
#
|
#
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue