Date: Wed, 2 Aug 1995 02:24:42 -0700 From: asami@cs.berkeley.edu (Satoshi Asami) To: doc@freebsd.org Subject: How to make a swapfile Message-ID: <199508020924.CAA10579@silvia.HIP.Berkeley.EDU>
index | next in thread | raw e-mail
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? :)
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508020924.CAA10579>
