Implement partitioning using a function
This commit is contained in:
parent
dea9095573
commit
87a25ce378
2 changed files with 30 additions and 29 deletions
|
@ -1,31 +1,33 @@
|
|||
#!/bin/bash
|
||||
{
|
||||
# Delete placeholders for swap and Linux partition
|
||||
echo "d";
|
||||
echo "2";
|
||||
function dualbootPartition() {
|
||||
{
|
||||
# Delete placeholders for swap and Linux partition
|
||||
echo "d";
|
||||
echo "2";
|
||||
|
||||
echo "d";
|
||||
echo "3";
|
||||
echo "d";
|
||||
echo "3";
|
||||
|
||||
# Create swap partition
|
||||
echo "n";
|
||||
echo "";
|
||||
echo "";
|
||||
echo "+${SWAP_SIZE}G";
|
||||
echo "y";
|
||||
echo "t";
|
||||
echo "2";
|
||||
echo "19";
|
||||
# Create swap partition
|
||||
echo "n";
|
||||
echo "";
|
||||
echo "";
|
||||
echo "+${SWAP_SIZE}G";
|
||||
echo "y";
|
||||
echo "t";
|
||||
echo "2";
|
||||
echo "19";
|
||||
|
||||
# Fill remaining space with Linux partition
|
||||
echo "n";
|
||||
echo "";
|
||||
echo "";
|
||||
echo "";
|
||||
echo "y";
|
||||
echo "t";
|
||||
echo "3";
|
||||
echo "23";
|
||||
# Fill remaining space with Linux partition
|
||||
echo "n";
|
||||
echo "";
|
||||
echo "";
|
||||
echo "";
|
||||
echo "y";
|
||||
echo "t";
|
||||
echo "3";
|
||||
echo "23";
|
||||
|
||||
echo "w";
|
||||
} | fdisk "$OS_DISK";
|
||||
echo "w";
|
||||
} | fdisk "$OS_DISK";
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash -e
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
. "./partition.sh";
|
||||
|
||||
extraMounts()
|
||||
{
|
||||
|
@ -8,9 +9,7 @@ extraMounts()
|
|||
}
|
||||
|
||||
function initializePartitions() {
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
. "./partition.sh";
|
||||
popd > /dev/null;
|
||||
dualbootPartition;
|
||||
}
|
||||
|
||||
SKIP_FORMAT_EFI=1 \
|
||||
|
|
Loading…
Reference in a new issue