Subject: Re: tmp in mfs and swap
To: None <current-users@NetBSD.ORG>
From: Jon Buller <jonb@metronet.com>
List: current-users
Date: 02/06/1996 21:19:48
> Let's see.  If you use a ramdisk, you can put any filesystem there, not
> just FFS.  (This is admittedly not of much use, especially given vnd
> devices.)  Using a ramdisk fixes the RAM consumption of your
> filesystem, and thus the space available on the filesystem, at ramdisk
> config time; using mfs, as I understand it, lets the filesystem and
> system swap consumption compete for space with one another.  This can
> be good or bad, of course.

Unless you are trying to bootstrap a machine, in which case a
RAMdisk can save a few steps and a bunch of hassle.  Take the pc532
for instance (if I can remember how I did this a 1.5 years ago)

1) Use the ROM monitor to download a kernel and root filesystem
     into RAM.
2) Start the kernel running.
3) Format and label your disk with the tools in your 1MB RAM disk.
4) Load the rest of the system with kermit, rz, ftp/ppp, etc.
     (Also on your RAMdisk image. It's tight, but possible.)

Your other option is to download the disklabel and image into ram,
copy it onto the disk with the ROM monitor, all in 1 to 3 MB pieces
if you only have 4MB, then boot the system.

If you only have one disk, it can be a problem trying to repartition
the disk while the system is running on it.  If your careful you
can repartition a running disk, or lay things out so you don't have
to, but it WILL be tougher, and much less forgiving of any mistake.
This also assumes that your ROM has read and write capability with
your disk, instead of read-only.  (It shouldn't be a big deal to have
both in ROM, but if not, you'll need a stand alone tool to do it.)

I found it very easy to load a kernel and a small FS image into
ram and start the kernel up.  From there I had a small, but very
powerful, set of tools to bring the machine up the rest of the way.
I would NOT have wanted to have to write the RAM images to disk to
boot the machine for the above reasons, other people may want to
boot differently 8-) It is by far easier to put an extra disk on
a system, newfs it, cp the stuff you want, take the disk out,
install it in the new machine and go, but that isn't always possible.
And better than that is to have an installed OS and extra disk already
on the system you want to bootstrap.

A RAMdisk is not anywhere near as handy on an installed and running
system, but mfs would be just about useless on a bare system.  Sorry
to become so long winded, but I don't want to repeat the experience
of building a system from scratch, even with a RAMdisk...

Jon