Add a script for partitioning an arch system
This commit is contained in:
parent
eabee350a9
commit
36c3844526
1 changed files with 39 additions and 0 deletions
39
scripts/OS/Arch/partition.sh
Executable file
39
scripts/OS/Arch/partition.sh
Executable file
|
@ -0,0 +1,39 @@
|
||||||
|
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||||
|
|
||||||
|
source "../../Scripts/choose-disk.sh";
|
||||||
|
chooseDisk disk "Which disk do you whish to format for installing Arch?";
|
||||||
|
memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')";
|
||||||
|
memory="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024) + 0.5)}')";
|
||||||
|
swapSize="$(echo "$memory" | awk '{ print int(($1 / 4) + 0.5)}')";
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "g";
|
||||||
|
|
||||||
|
echo "n";
|
||||||
|
echo "";
|
||||||
|
echo "";
|
||||||
|
echo "+1G";
|
||||||
|
echo "y";
|
||||||
|
echo "t";
|
||||||
|
echo "1";
|
||||||
|
|
||||||
|
echo "n";
|
||||||
|
echo "";
|
||||||
|
echo "";
|
||||||
|
echo "+${swapSize}G";
|
||||||
|
echo "y";
|
||||||
|
echo "t";
|
||||||
|
echo "19";
|
||||||
|
|
||||||
|
echo "n";
|
||||||
|
echo "";
|
||||||
|
echo "";
|
||||||
|
echo "";
|
||||||
|
echo "y";
|
||||||
|
echo "t";
|
||||||
|
echo "23";
|
||||||
|
|
||||||
|
echo "w";
|
||||||
|
} | fdisk "$disk";
|
||||||
|
|
||||||
|
popd > /dev/null;
|
Loading…
Reference in a new issue