/etc on a separate filesystem ?

Polytropon freebsd at edvax.de
Thu Sep 4 15:31:03 UTC 2014


On Thu, 4 Sep 2014 22:07:39 +0700, Victor Sudakov wrote:
> Colleagues,
> 
> Is it possible to keep /etc on a separate filesystem? 

It is problematic. The file /etc/fstab is used to mount the
file systems, and /etc/rc controls the whole system startup.
There would have to be a replacement located on / which is
later on removed from /etc, so that the desired partition
can be mounted instead. Probably it's possible to achieve
this goal by modifying the location of files involved in
the boot process before /etc can be mounted, but that would
require dealing with lower-level OS internals. For example,
/fstab and /rc could be used (located on /) which make /etc
available and "continue from there". But it also would mean
you have _two_ fstab's and rc's. But those two aren't probably
the only "offenders": what about /etc/ttys, /etc/gettytab
or the /etc/rc.d/ subtree? They'll also be needed.

In general, the idea doesn't look much appealing. ;-)

The /etc directoriy is too fundamental to early-stage OS
operations that it deserves being on the / partition. Keep
in mind that it traditioally even had programs in it that
were required to boot the system, like /etc/mount, /etc/GETTY
or /etc/fsck. It's name /etc, meaning "et cetera", initially
pointed out that there were "further programs" that were
considered important to the OS. Operating systems such
as UNIX System III, WEGA or SunOS / early Solaris followed
that concept.

Later on, /etc became the place for OS configuration files,
often called "editable text configuration". :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list