From owner-freebsd-doc Wed Aug 2 02:24:55 1995 Return-Path: doc-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id CAA25795 for doc-outgoing; Wed, 2 Aug 1995 02:24:55 -0700 Received: from silvia.HIP.Berkeley.EDU (silvia.HIP.Berkeley.EDU [136.152.64.181]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id CAA25788 for ; Wed, 2 Aug 1995 02:24:48 -0700 Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.6.11/8.6.9) id CAA10579; Wed, 2 Aug 1995 02:24:42 -0700 Date: Wed, 2 Aug 1995 02:24:42 -0700 Message-Id: <199508020924.CAA10579@silvia.HIP.Berkeley.EDU> To: doc@freebsd.org Subject: How to make a swapfile From: asami@cs.berkeley.edu (Satoshi Asami) Sender: doc-owner@freebsd.org Precedence: bulk Can we make a section about this in the handbook? It should be something like ======= If you want to make a 32MB swapfile, do this. (1) Find a partition on your disk that has enough free space to hold a 32MB file. Say that's /var. (2) Use the dd command: dd if=/dev/zero of=/var/swapfile bs=1024k count=32 to create a 32MB file. (3) cd to /dev and issue the command: sh ./MAKEDEV vn0 to create a virtual node. (4) Use the vnconfig command: vnconfig -e /dev/vn0c /var/swapfile swap to configure that file as a virtual node with swap enabled. (5) Add it to the system's swap pool by: swapon /var/swapfile (6) Check that it is working by: pstat -s ======= We might want something about doing this automatically at boot. Will this be enough? # cat >> /etc/vntab /dev/vn0c /var/swapfile ^D # cat >> /etc/fstab /dev/vn0c none swap sw 0 0 ^D Hmm, actually I don't know if /etc/vntab is scanned during reboot. Should the vnconfig -a and swapon go to rc.local? Satoshi P.S. What happened to my slip client section? :)