How customized can an mfsroot be?

Peter Steele psteele at maxiscale.com
Wed Apr 7 18:40:19 UTC 2010


>I'm probably missing something here, but I'm not sure that's correct.  If the OP wants his own /var, then diskless(8) describes how
>/var can be automagically populated (see also /etc/rc.initdiskless).  The nanobsd.sh script (designed with flash drives in mind) uses
>this method.  I looked into adopting something similar some time back but decided on an alternative solution so I can't provide anything
>more than a general comment.
>
>As a side comment, I'd add I hope the OP publishes the results of his efforts to benefit others who may want to do the same.

>From what I can tell, diskless talks about network booting via a PXE server. That's a little different than what I'm doing--booting from a read-only
CD-ROM. With network booting, you can create your own customized mfsroot with whatever you want in /var. I could have setup a mfsroot based
boot for my CD-ROM, but there are other restrictions to the mfsroot environment that I wanted to avoid. In my read-only CD-ROM boot case,
/var is created as a MFS device automatically and populated, but a basic directory layout only is used. Nothing from the CD-ROM /var is copied into the
MFS /var that is created.

I cannot figure out how BSD can do this automagically, so I'll have to have a duplicate copy of /var on the CD and populate it from that. What I've tried
that works well is when I'm about to run mkisofs to create the .iso from, I rename my /var to /var2 and create an empty /var. When the iso is booted,
a default MFS based /var is created with a specific collection of directories. I have a startup script that copies my /var2 contents into /var and that
does the trick.

Thanks to all the responders on this. I think I've worked out all of the kinks now.





More information about the freebsd-questions mailing list