From owner-freebsd-questions Fri Sep 15 10:38:11 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA25223 for questions-outgoing; Fri, 15 Sep 1995 10:38:11 -0700 Received: from main.statsci.com (main.statsci.com [198.145.127.110]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id KAA25212 for ; Fri, 15 Sep 1995 10:37:55 -0700 Received: by main.statsci.com (Smail3.1.29.1 #3) id m0stehj-000r3vC; Fri, 15 Sep 95 10:37 PDT Message-Id: X-Mailer: exmh version 1.6.1 5/23/95 To: kallio@jyu.fi (Seppo Kallio) cc: questions@freebsd.org Subject: Re: * Can I use DOS filesystem for SWAP? * In-reply-to: Your message of "Fri, 15 Sep 1995 18:12:23 +0300." Reply-to: scott@statsci.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 15 Sep 1995 10:37:33 -0700 From: Scott Blachowicz Sender: owner-questions@freebsd.org Precedence: bulk kallio@jyu.fi (Seppo Kallio) wrote: > The diskless FreeBSD+XFree would be a nice X server if it could swap to DOS > file system file. Can FreeBSD use DOS file as SWAP space? I'd be happy just to be able to use a 'msdos' file system for reading. Mounting mine read-only, then accessing it eventually corrupts my FreeBSD file systems. :-(( At any rate, I've seen this mentioned in a message to 'doc' (but I've not tried it and I don't know if it will interact badly with something on an 'msdos' file system): 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 Hope that provides some useful pointers, at least. Scott Blachowicz Ph: 206/283-8802x240 StatSci, a div of MathSoft, Inc. 1700 Westlake Ave N #500 scott@statsci.com Seattle, WA USA 98109 Scott.Blachowicz@seaslug.org