Hello,
I was reading couple of howtos (yeah!) about read-only / with
/etc as mfs.
I suppose these howtos overlook problem with unavailability of some
important files.
I suppose boot and init needs some files in /etc before running
/etc/rc, like ttys and master.passwd etc... If you mount /etc
as mfs over "old" /etc used by init, I think you can see following:
* you cannot modify files hidden under monted over /etc
...and...
* init in single user would ask you different root's password
then used in "normal" state
I apologize if anybody would complain that this is not supported
solution but anyway, what is your workaround and what do you
think about solution below?
jirib
files before init:
==================
/etc/boot.conf
files needed by init:
=====================
/etc/rc
/etc/ttys
/etc/passwd
/etc/master.passwd
/etc/ptmp # ignore!
/etc/pwd.db
/etc/spwd.db
/etc/login.conf
files used by /etc/rc before `mount'
====================================
/etc/defaultdomain # ignored by me
/etc/rc.conf # this could be theoretically skipped
# if moved later in /etc/rc
/etc/raid$dev.conf # ignored by me
/etc/fstab
scenario:
=========
* mkdir /proto_etc
* cp -Rp /etc/* /proto_etc
* mkdir /pre_etc
* cd /pre_etc
* for i in boot.conf rc ttys passwd master.passwd pwd.db spwd.db login.conf
fstab rc.conf ; do
ln /etc/$i $i
done
* mount_mfs -s 20M -P /proto-etc swap /etc
* rsync -vhaz --delete \
--exclude boot.conf \
--exclude rc \
--exclude ttys \
--exclude passwd \
--exclude master.passwd \
--exclude pwd.db \
--exclude spwd.db \
--exclude login.conf \
--exclude fstab \
--exclude rc.conf /etc/ /proto_etc/
* cd /etc
* for i in boot.conf rc ttys passwd master.passwd pwd.db spwd.db login.conf
fstab rc.conf ; do
cat /etc/$i > /pre_etc/$i
done