Swap space
Chris Tyler
chris at tylers.info
Sat Feb 21 16:52:21 UTC 2009
On Sat, 2009-02-21 at 14:56 +0100, chedi toueiti wrote:
> Hi,
>
> You can try this:
> 1- Create a swap file (use this if you can't change your partition
> layout) via the command:
> dd if=/dev/zero of=/tmp/swap_file bs=1024M count=1
> 2- format the swap file with :
> mkswap /tmp/swap
> 3- add the new swap file swap system
> /sbin/swapon /tmp/swap_file
> 4- make the swap load on boot loading
> echo /sbin/swapon /tmp/swap_file >> /etc/rc.local
Two things:
(1) The swap file probably shouldn't be in /tmp (files there are deleted
when unused for a time -- which shouldn't happen in this case, but
nonetheless the intention is for this to be long-term swap file). The
root directory or /var are common locations for a swap file.
(2) In place of step 4, which adds to the rc.local startup script, it's
preferred to list the swap in the /etc/fstab (where the existing swap is
already listed):
echo "/wherever/swapfile swap swap defaults 0 0" >>/etc/fstab
-Chris
More information about the fedora-list
mailing list