Get your swap on

home | blog | Teh Internet | guest blog |rants | placeholder | political | projects | Gwen and Liam | Citadel patched | Tools | Scouts

- Careful Chrome users, this search box might be "Not secure"

To add a swap file post install (i.e. you don't have a free partition to dedicate to swap):

dd if=/dev/zero of=/swap/swapfile bs=1024 count=(number of blocks to get to your desired swap size)

mkswap /swap/swapfile
Setting up swapspace version blah, size = blah
no label, UUID=uuid-from-mkswap-command

chmod 0600 /swap/swapfile
swapon /swap/swapfile
swapon -s (see that it is in use).

free -m
(chuck this in /etc/fstab for reboots):
/swap/swapfile  none  swap  sw  0  0
alternatively by UUID:
UUID=uuid-from-mkswap-above none            swap    sw              0       0

- probably good to test with a:
mount -a
(and correct mistakes before any reboot)...