setting size of swap based on amount of RAM

Henning Sprang henning_sprang at gmx.de
Tue Feb 12 22:29:33 CET 2008


On Tue, 2008-02-12 at 13:27 -0600, John Heim wrote:
> Anybody  invented a good way to determine the size of the swap partition 
> based on the amount of RAM? I guess what I could do is have different 
> classes for amount of RAM and then have a different a different partitioning 
> file for each. But I'm already getting too many partitioning schemes. I 
> already have different classes for linux-only vs dual-boot machines. And 
> then I have some drastically different hard disk sizes so I have different 
> classes for very small and very large HDs.

You could use something like Text::Template to build your disk_config
(or setup_stroage) file in a hook before partitioning - and change the
swap size depending on RAM...

hth,
Henning



More information about the linux-fai mailing list