To add swap space on an already installed system:
where file is the full pathname of the new file, and num is the number of MBs of swap space desired, and blocksize is the block size for both input and output. file must be in the root filesystem (``/''): if it is not, the swaptab will not be able to add it.
The device_name is the name of the file you created using the dd command, the start_offset is 0, and the minus sign indicates that the entire file is to be used as the size of the new swap space.
For example, the following sequence of commands configures 32MB of swap space (user input is in bold):
#dd if=/dev/null of=swapfile oseek=32 bs=1024k0=0 records in 0=0 records out #ls -l swapfile-rw-r---r-- 1 root sys 33554432 Jul 18 11:58 swapfile #swap -a swapfile#swap -lpath dev swaplo blocks free /dev/swap 38,2 0 819312 819312 swapfile 38,513 0 65536 65536
See swaptab(4) for more information about the /etc/swaptab file and dd(1M) for information about the data dump command.