diff options
author | xengineering <mail2xengineering@protonmail.com> | 2020-01-12 17:40:15 +0100 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2020-01-12 17:40:15 +0100 |
commit | 2f6a6e43c47a345ca72028177cea92e7307cebff (patch) | |
tree | df794f83727366257c892a2c47bca472e6b90702 /util/partition_disk.sh | |
parent | b71ec259f10635f1fb907caa8076bbc2710adf02 (diff) | |
download | archinstall-2f6a6e43c47a345ca72028177cea92e7307cebff.tar archinstall-2f6a6e43c47a345ca72028177cea92e7307cebff.tar.zst archinstall-2f6a6e43c47a345ca72028177cea92e7307cebff.zip |
First version of BIOS boot.
Diffstat (limited to 'util/partition_disk.sh')
-rw-r--r-- | util/partition_disk.sh | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/util/partition_disk.sh b/util/partition_disk.sh index fcad5b9..6164d1b 100644 --- a/util/partition_disk.sh +++ b/util/partition_disk.sh @@ -19,11 +19,13 @@ disk_path=$1 # e.g. /dev/sda +boot_mode=$2 # "UEFI" or "BIOS" -wipefs -a $disk_path # make sure that fdisk does not ask for removing - # signatures which breaks the script -fdisk $disk_path << EOF +if [ "$boot_mode" == "UEFI" ]; then + wipefs -a $disk_path # make sure that fdisk does not ask for removing + # signatures which breaks the script + fdisk $disk_path << EOF g n 1 @@ -41,4 +43,22 @@ p w EOF -echo "Partitioned disk - OK" + echo "Partitioned disk for UEFI/GPT- OK" +elif [ "$boot_mode" == "BIOS" ]; then + wipefs -a $disk_path # make sure that fdisk does not ask for removing + # signatures which breaks the script + fdisk $disk_path << EOF +o +n +p +1 + + +p +w +EOF + + echo "Partitioned disk for BIOS/MBR - OK" +else + +fi |