Sounds like you are talking about Debian.
This tells you everything if you have it using the traditional init system. Specifically:
The "/sbin/init" program is executed as the first program and performs
the main boot process. The Debian normally uses the traditional
sysvinit scheme with the sysv-rc package. See init(8), inittab(5), and
"/usr/share/doc/sysv-rc/README.runlevels.gz" for the exact
explanation. This main boot process essentially goes through the
The Debian system goes into runlevel N (none) to initialize the system by following the "/etc/inittab" description.
The Debian system goes into runlevel S to initialize the system under the single-user mode to complete hardware initialization etc.
The Debian system goes into one of the specified multi-user runlevels (2 to 5) to start the system services.
What happens per runlevel is that everything in
/etc/rcX.d is executed, in alphabetical order, where
X is the run level.
So, if you
cd /etc/rcS.d, you will see a bunch of symlinks to
/etc/init.d, that begin with a number. The number is there to determine the order. The ones beginning with
S are executed when the run level is entered, and the ones beginning with
K are executed when the run level is exited. Runlevel "S" is just used for initialization so there are no
K links there.
Tread with caution here if you modify or rename anything. Make sure you test your scripts before subjecting yourself to a boot process.
Ok, going to try to actually answer the question now, with the above information as necessary background.
Under Debian the
/etc/rc.S/S11mountall.sh is where the crucial "mount everything in fstab" happens. However,
fstab is consulted to mount the root filesystem at
If you use
fstab to automount a new
/etc, everthing in
/etc/rc.S/S12* and higher will then be using the
/etc on your "overlay" volume. However, you need a valid
/etc/fstab on the root volume at that time beforehand.
Other things that
/etc is consulted for include
/etc/hostname, possibly some stuff related to
udev (which is extremely important). You need to look at all the scripts from
/etc/rc.S/S11* and lower to know exactly. If you really want no
/etc at all until it is mounted from an external partition you are looking at modifying these scripts. It's probably not going to be as simple as switching the order of
/etc/rc.S/S12mountall.sh to, for example
/etc/rc.S/S00mountall.sh, but you possibly could add a new script that brings in
/etc from an external partition earlier.
You can use the Linux
mount --bind command to mount the root volume's original
/etc somewhere (like
/etc_from_rootfs) to copy it over when you make changes to
fstab or other files that are consulted before
The Linux kernel does not do what Windows does, which is to use and require the presence of the registry before and during boot. The kernel itself will boot fine (but not terribly useably in 99% of instances) with no
/etc, but it's up to userspace programs called after (starting with
init), which then look at
/etc, to get a decent user environment ready.
Sound complicated? It is, which is why listening to @MattDMo is likely prudent.