/etc on a separate filesystem ?

Victor Sudakov vas at mpeks.tomsk.su
Fri Sep 5 04:06:41 UTC 2014


Adam Vande More wrote:
> > > >
> > > > > Michael Sierchio wrote:
> > > > >> > Is it possible to keep /etc on a separate filesystem?
> > > > >> No. /etc/fstab, among other things
> > > > >
> > > > > That's why I am asking.
> > > >
> > > > It kind of depends on *why* you're asking.
> > >
> > >
> > > Sounds an awful lot like an XY problem to me.
> >
> > That's fair. Let me explain my purpose. I have created a LiveUSB for
> > testing and hardware diagnostics with dualboot: FreeBSD amd64 and
> > i386. I was looking for a way for them to share a common /etc.
> >
> > If there is no easy way, I can rsync changes of /etc from one system
> > to another on shutdown, or find something else.
> 
> 
> That is a better description.  If this tool is going to be confined to a
> network you have control over, doing a diskless mount on /etc may be
> sufficient.  Otherwise unison does FS synchronization, 

What FS synchronization? Remember, I don't need to synchronize the
whole root fs, just /etc.

> or you could take a
> more targeted approach with rcs(1).

Whatever means can be used to synchronize two copies of /etc
(certainly more than one), they are still two copies which can fall
out of sync eventually. One common copy would be a KISS solution. 

Who exactly reads /etc/fstab? The kernel, I suppose, before it even
looks for init? Can the kernel be modified to look for it somewhere
else, like in /boot/fstab ?

Or could I just redefine vfs.root.mountfrom to a small partition with
a minimum set of files, and then have init look for /etc/rc in the
real /etc ?

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov at sibptus.tomsk.ru


More information about the freebsd-questions mailing list