Browse by category

Search    |    Advanced search

How do I create SWAP file on FreeBSD
  1. The GENERIC kernel already includes the memory disk driver required for this operation. When building a custom kernel, make sure to include the following line in your custom configuration file:
    device md
  2. Create a swapfile (/usr/swap0):
    dd if=/dev/zero of=/usr/swap0 bs=1024k count=64
  3. Set proper permissions on (/usr/swap0):
    chmod 0600 /usr/swap0
  4. Enable the swap file in /etc/rc.conf:
    swapfile="/usr/swap0" #Set to name of swapfile if aux swapfile desired.
  5. Reboot the machine or to enable the swap file immediately, type:
    mdconfig -a -t vnode -f /usr/swap0 -u 0 && swapon /dev/md0
Add comment
Views: 1520
Votes: 0
Comments: 0

Other articles in this Category