Subject: More on read-only root
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 05/04/1995 20:01:47
I've seen three responses already to my note about read-only roots.
One expressed interest in what I'd done, especially the rc script
changes; one remarked that it would perhaps help if I could indicate
how extensive the changes are; and one said something about wanting to
mount root read-only on a diskful machine.

I received the first of these first, and composed a private reply.  I
was somewhat surprised to find that, of the many changes I've made,
very few are actually related to the read-only root.  Briefly,
/etc/fstab needs to be somewhere else, with all that implies.

At any rate, I believe I have a setup where only /tmp and /var need to
be machine-specific.  The changes required are

- /etc/fstab is a symlink to ../var/etc/fstab.  This is done so that
   multiple machines can share the same root area; for a diskful
   machine it would not be necessary.  This implies some hair in
   /etc/rc, bceause until /var is mounted, there's no fstab, which
   makes it interesting to select the correct server and path to mount
   /var.  This is the greatest complication, and even it is relatively
   straightforward.

- /etc/rc gets some code to deal with the aforementioned problem of
   getting /var mounted.  I also tweaked a few other things in /etc/rc
   related to mounting.

The changes I have made will, as they stand, cause trouble for diskful
machines, but this is fairly easy to fix.  I haven't addressed it
largely because I'm still in the development phase, and this isn't
really intended to be release-ready yet.  It's also possible that I've
made some assumptions about diskless booting that are not generally
valid, because I've seen NetBSD boot diskless on only the sun3 and
sparc ports.  (Essentially, I assume that the machine comes up with its
hostname set, its principal network interface configured enough to talk
to its server, and knowing where its root is mounted from.)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu