Quote:
Originally Posted by vignesh
Hey,
You can skip creating a swap partition. If you always feel the need you can create a page file and do swapon. But I would recommend having atleast 256Mb of swap. The general rule is 2x ram size but I would say unless you are doing some heavy stuff, 256 megs will be enough.
|
from his post, i will assume, he is a rookie, and i will also assume its a he.
if i were him? i will never got for a swap, i will have a custom kernel, with unwanted drivers stripped off, and a stock kernel, and will have /boot left un-encrypted, and rest in / fully encrypted with UUID and twofish encryption and inside it will have a flat file used as a swap. but then again. thats my way.
and then again, he can create many more swaps later and may either add them in fstab ot just hand mount them as and when need is felt.
# dd if=/dev/zero of=swapfile-1 bs=1M count=1024
# dd if=/dev/urandom of=swapfile-1 bs=1M count=1024
# mkswap -c -v1 -p4096 -L extra-swapfile-1 swapfile-1
# swapon -v swapfile-1
# swapoff -v swapfile-1
and this step is optional
# echo "path-to/swapfile-NX none swap 0 0" >> /etcfstab
this is open source, so there are too many ways to do things, isnt it?
i used /dev/urandom instead of /dev/zero because this gives better randomization but it is time consuming and takes a hell lot of time.