From fd33bf82872d03a5353dba6ef04b148992a87385 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 3 Feb 2024 23:45:28 -0700 Subject: [PATCH] sd --- gentoo-gnome.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gentoo-gnome.sh b/gentoo-gnome.sh index 4211fb9..0fc47cf 100644 --- a/gentoo-gnome.sh +++ b/gentoo-gnome.sh @@ -463,16 +463,16 @@ btrfs-tweaks() { } initialize-disk() { - SWAP_SIZE=$(expr $ROOT_PARTITION_SIZE + 16) - SWAP_VAL="$SWAP_SIZE GiB" + SWAP_SIZE=expr $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g' | sed 's/kB//') / 1024 + echo $SWAP_SIZE parted /dev/$HARD_DISK mklabel gpt parted -a optimal /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB - parted -a optimal /dev/$HARD_DISK mkpart primary ext3 200MiB $ROOT_PARTITION_SIZE + parted -a optimal /dev/$HARD_DISK mkpart root ext3 200MiB $ROOT_PARTITION_SIZE parted -a optimal /dev/$HARD_DISK set 1 esp on echo $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g') sleep 5 - parted -a optimal /dev/$HARD_DISK mkpart swap ext3 $ROOT_PARTITION_SIZE $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g') - parted -a optimal /dev/$HARD_DISK mkpart home ext3 $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g') 100% + parted -a optimal /dev/$HARD_DISK mkpart swap ext3 $ROOT_PARTITION_SIZE $SWAP_SIZE + parted -a optimal /dev/$HARD_DISK mkpart home ext3 $SWAP_SIZE 100% partitionDetection echo echo "Formatting....."