From 7ea8fa8f8ba417709adb6347f828519e5525b014 Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Mon, 9 Nov 2020 04:41:50 +0000 Subject: [PATCH] Better term 'force gpt' & explanation --- README.md | 8 ++++---- netboot.sh | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2622a99..c0b8602 100644 --- a/README.md +++ b/README.md @@ -39,10 +39,10 @@ This script is used to re-install VPS to **Debian 9 (stretch) or 10 (buster)** w - `--skip-partitioning` - `--partitioning-method regular` - `--disk` - - `--mbr` - - `--gpt` - - `--bios` - - `--efi` + - `--force-gpt` Create a *GUID Partition Table* **(Default)** + - `--no-force-gpt` + - `--bios` Don't create *EFI system partition*. If GPT is being used, create a *BIOS boot partition* (`bios_grub` partition). Default if `/sys/firmware/efi` is absent + - `--efi` Create an *EFI system partition*. Default if `/sys/firmware/efi` exists - `--filesystem ext4` - `--kernel` Choose an package for the kernel image - `--cloud-kernel` Choose `linux-image-cloud-amd64` as the kernel image diff --git a/netboot.sh b/netboot.sh index c295e32..71a0e7f 100755 --- a/netboot.sh +++ b/netboot.sh @@ -45,7 +45,7 @@ ntp=0.debian.pool.ntp.org skip_partitioning=false partitioning_method=regular disk= -gpt=true +force_gpt=true efi= filesystem=ext4 kernel= @@ -161,11 +161,11 @@ while [ $# -gt 0 ]; do disk=$2 shift ;; - --mbr) - gpt=false + --force-gpt) + force_gpt=true ;; - --gpt) - gpt=true + --no-force-gpt) + force_gpt=false ;; --bios) efi=false @@ -403,7 +403,7 @@ EOF if [ "$partitioning_method" = regular ]; then - [ "$gpt" = true ] && $save_preseed << 'EOF' + [ "$force_gpt" = true ] && $save_preseed << 'EOF' d-i partman-partitioning/default_label string gpt EOF