Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 1995 10:37:33 -0700
From:      Scott Blachowicz <scott@statsci.com>
To:        kallio@jyu.fi (Seppo Kallio)
Cc:        questions@freebsd.org
Subject:   Re: * Can I use DOS filesystem for SWAP? * 
Message-ID:  <m0stehj-000r3vC@main.statsci.com>
In-Reply-To: Your message of "Fri, 15 Sep 1995 18:12:23 %2B0300." <v01530536ac7f411cc4ac@[130.234.41.39]> 

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0stehj-000r3vC>