On 11/13/09, Chuck Swiger <cswi...@mac.com> wrote: > Hi, David-- > > On Nov 13, 2009, at 2:48 PM, David Allen wrote: >> There are options available in /etc/defaults/rc.conf to do just that, >> but how does one copy over the contents of /var at system boot? > > I'd consider adding something to /etc/rc.d/mountcritlocal (which > normally mounts the local filesystems) to setup a RAMdisk on /var and > then do "rsync -a /var_template /var" (or use a dump/restore or tar > pipeline).
At the risk of sounding obtuse while asking for more help, I can work out the rsync or dump part, but the rest I don't get. The mountcritremote essentially just does a mount -a -t ..., yes? To insert a few mdmfs commands followed by rsync commands, for example, would require re-writing most the script. Is there a better place to this? The reason I ask is that some time ago I had a look at nanobsd which is designed to run on RO flash media. The /var and /tmp directories are created as memory devices that supposedly get re-populated from a /cfg directory at boot. The /usr/src/tools/tools/nanobsd/nanobsd.sh setup script has a function named setup_nanobsd_etc. Essentially, it writes out an /etc/fstab file and does a 'touch /etc/diskless'. Unless there's magic that happens behind the scenes with that /etc/diskless file, I don't see how anything gets re-populated. Put simply, I'm stuck somewhere between that script and your suggestions thus far. Thanks. _______________________________________________ email@example.com mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"