[CentOS] Kickstart wrong swap size

Mon Dec 7 13:56:25 UTC 2009
John Doe <jdmls at yahoo.com>

From: Lars Hecking <lhecking at users.sourceforge.net>
> All machines kickstarted here consistently have a swap partition with the
> wrong size. According to the RHEL5 manual:
> 
> | To determine the size of the swap partition automatically, use the
> | --recommended option:
> |
> | swap --recommended
> |
> | The recommended maximum swap size for machines with less than 2GB of RAM is
> | twice the amount of RAM. For machines with 2GB or more, this recommendation
> | changes to 2GB plus the amount of RAM. 
> 
> However, the swap partition on all kickstarted machines is 2GB, regardless
> of RAM size.

The installation guide says "between":

"If the system memory is between 128MB and 2GB, the size of the swap
partition will be between the system memory size and twice the amount
of system memory. For example, a system with 1GB of system memory will
have a swap partition sized *** between 1GB and 2GB ***.
If the system memory is higher than 2GB, the size of the swap partition
will be a between 1GB and 2GB plus system memory. For example, a system
with 4GB of system memory will have a swap partition sized *** between 1GB
and 6GB ***."

You could always have a pre-script generate the 'correct' swap size (based on your own formula), put it in a file and include that file in the kickstart file...

JD