init: Add init script to setup /etc mount before starting systemd

Systemd requires /etc mounted and ready at init time. Previously, we
were mounting /etc as an overlay from the persistant filesystem after
systemd started. This caused a variety of issues with systemd and
associated applications (journal, etc).
This change also adds factory reset functionality.

Resolves openbmc/openbmc#2542

Change-Id: Ib8a38e99df39f833026fe4475670a7ec2b9c8d4d
Signed-off-by: Edward A. James <eajames@us.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/preinit-mounts/preinit-mounts.bb b/meta-phosphor/common/recipes-phosphor/preinit-mounts/preinit-mounts.bb
new file mode 100644
index 0000000..e3aaf54
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/preinit-mounts/preinit-mounts.bb
@@ -0,0 +1,10 @@
+inherit obmc-phosphor-license
+
+SRC_URI += "file://init"
+
+FILES_${PN} += "/sbin/init"
+
+do_install() {
+	install -d ${D}/sbin
+	install -m 0755 ${WORKDIR}/init ${D}/sbin/init
+}