diff --git a/gentoo-gnome.sh b/gentoo-gnome.sh index f72c4e2..3c44399 100644 --- a/gentoo-gnome.sh +++ b/gentoo-gnome.sh @@ -464,14 +464,14 @@ btrfs-tweaks() { initialize-disk() { SWAP_SIZE=$(expr $(cat /proc/meminfo | head -1 | cut -d ':' -f2 | sed 's/ //g' | sed 's/kB//') / 1024) - SWAP_SIZE_END="$(expr $SWAP_SIZE + $ROOT_PARTITION_SIZE)" + SWAP_SIZE_END="$(expr $SWAP_SIZE + $ROOT_PARTITION_SIZE / 1000)" echo "Start: $SWAP_SIZE END: $SWAP_SIZE_END" parted /dev/$HARD_DISK mklabel gpt parted -a optimal /dev/$HARD_DISK mkpart primary fat32 1MiB 200MiB parted -a optimal /dev/$HARD_DISK mkpart root ext3 200MiB ${ROOT_PARTITION_SIZE}GB parted -a optimal /dev/$HARD_DISK set 1 esp on - parted -a optimal /dev/$HARD_DISK mkpart swap ext3 ${ROOT_PARTITION_SIZE}GB ${SWAP_SIZE_END}KB - parted -a optimal /dev/$HARD_DISK mkpart home ext3 ${SWAP_SIZE_END}KB 100% + parted -a optimal /dev/$HARD_DISK mkpart swap ext3 ${ROOT_PARTITION_SIZE}GB ${SWAP_SIZE_END}GB + parted -a optimal /dev/$HARD_DISK mkpart home ext3 ${SWAP_SIZE_END}GB 100% sleep 10 partitionDetection echo