Problems with lofs on Sun-3/4, SunOS 4.0, 4.0.1

Per Westerlund perw at holtec.se
Fri Feb 10 16:11:27 AEST 1989


Using SunOS 4.0 (4.0.1) there is available a so called "loopback virtual
file system", lofs.  The use of it is not apparent, but I would like to
use it to mount /var/tmp on /tmp, increasing the apparent size of /tmp,
without increasing the true size of the root partition.  (Replacing /tmp
with a symbolic link to /var/tmp is not acceptable, makes single-user mode
without /var mounted a bit hard.)

All that should be needed is to add the following line to the config-file

	options		LOFS

and make a new kernel.

The file-system type is 'lo', and trial runs work,

	mount -t lo /var/tmp /tmp

gives the desired result.

Next step is to modify /etc/fstab and /etc/rc to have this mounting
automatic.  Add the line

	/var/tmp	/tmp	lo	rw	0	0

to /etc/fstab.  Since I have looked at how this is done on the 386i, I add
a line to /etc/rc to make it look like this:

	mount -at 4.2	>/dev/console 2>&1
	mount -at lo	>/dev/console 2>&1

THIS DOES NOT WORK!  During startup this message appears:

	"mount: unknown filesystem type: lo"

but the same command works as long as it is not run from within /etc/rc
(by init?).

A few possible explanations have been tried, without success:

- /etc/mount is statically linked.
- /sbin/mount is identical to (/usr)/etc/mount.

I have not been able to follow /etc/mount's doings with trace(1), since it
does a fork(2), and I loose it.  Debugging with adb(1) without a symbol
table is so hard that I wont even think about it.

Ideas, someone?

		Per Westerlund
		Holistic Technology AB
		Gothenburg
		SWEDEN
		+46 31 420370
		perw at holtec.se



More information about the Comp.sys.sun mailing list