Get your swap on

home | blog | Terrible people and places | Covid-19 links | Teh Internet | guest blog |rants | placeholder | political | projects | Gwen and Liam | Citadel patched | Tools | Scouts



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)...
- looks like you might get:
mount: swap: can't find UUID=blahhhhh
sometimes, so huh, not sure.  Systemd?  Nah.  So probably use abs location, even though uuid would be
"futuristic".

done!



[æ]