Subject: Sharing /usr
To: None <>
From: Gordon W. Ross <>
List: amiga
Date: 11/09/1995 12:47:16
[ Copied to port-amiga since it might be of interest there. -gwr ]

> Date: Thu, 9 Nov 1995 08:49:19 +0000
> From: Julian Bean <>
> Hi there all.
> I am just about to set up a full, source distribution of NetBSD - to run on
> a Sun3/50 and a Mac LCIII. (Including X11R6)
> What I would like to now is, roughly, how much disk space will that take
> up, and how much of the tree can be shared between the two.  The LC will
> likely have about 800M of local disk space, and the Sun3 has 100.  I would
> like to mount as much of the Sun3's filesystems over nfs as possible
> without comprimising speed too much.  They will be on the same ThinNet
> ethernet (assuming NetBSD/mac68k will recognise my Asante card - gulp!).
> Also, are the two 68k ports binary-compatible?
> Thanx for any help you can offer,
> Jules

I would suggest installing on the Sun3 as follows: (/etc/fstab)
	/dev/sd0a / ufs rw 1 1		# 32MB or more
	/dev/sd0b none swap sw 0 0	# 16MB or more
	/dev/sd0h /home ufs rw 1 2	# the remaining space
	themac:/usr /usr nfs ro,-r=1024,-w=1024

On the mac, /usr will contain m68k generic binaries for the most part.
There are a few exceptions (which we should eliminate eventually), but
for now you can work around that using symlinks, and depending on the
fact that symlinks are resolved in the namespace of the client.  So,
on both machines you create /usr.arch (in the root, which is local)
and populate it with those files from /usr that are machine specific.
Then, in /usr (on the mac) make those files symlinks into /usr.arch:

For example, on the mac:
	mkdir /usr.mac68k
	ln -s /usr.mac68k /usr.arch
	mkdir /usr.mac68k/{bin,lib,libexec,sbin}
	cd /usr
	foreach f (sbin/kvm_mkdb lib/libkvm*)
	  cp -p $f /usr.mac68k/$f
	  rm -f $f
	  ln -s /usr.arch/$f $f
Then do a similar thing with /usr.sun3 on the sun3, i.e.:
	mkdir /usr.sun3
	ln -s /usr.sun3 /usr.arch
	foreach ...
(Otherwise the same.)  You will probably want to do a similar thing for
/usr/include/machine, /usr/obj, /usr/local, /usr/mdec, and who knows
what else I've forgotten.  (It will become obvious soon enough! 8^)

This is a bit of a hack, but it will let you share most of /usr between
your Sun3 and your Mac.  Someday we should make this easier to do...

Gordon Ross