Michael MacIsaac wrote:
Leland,

For you "shared root crazies" out there, how did you get /etc to unmount
...
Or perhaps a better question is "How did you get /etc to *mount*?"

As I recall the install programs will not allow /etc to be a mounted file
system.  This makes some sense as the file system table (fstab) is in
/etc/ - so there's a chicken-and-egg problem with /etc being specified as
a file system in /etc.

I've toyed with a few different ways and have settled on an RO mounted
root with stuff like /etc, /var, and friends mounted as separate RW
filesystems (well, some are bind mounted to one RW filesystem).

Since I boot the RO root, fstab is already where it needs to be and
contains only /, proc, sys, etc. (but none of the RW stuff) and
"/etc/mtab" is a symlink to /proc/mounts.

I have a "boot.sharedroot" script running just before boot.localfs that
takes care of mounting things up the way I want them.

The only thing (that matters) up to that point that doesn't like a RO
root is LVM, but that was easy to resolve by adding
INITRD_FEATURES="lvm2" to /etc/sysconfig/kernel.  That gets the LVs
activated while initrd is active, so it has an RW etc.  But, this really
wasn't necessary since it would just take a bind mount of /etc/lvm over
to something like /dev/lvm just long enough to get the LVs active.  I
might even still do that to keep everything in the single
boot.sharedroot script.

The other main way I looked at was to have a very tiny (8MB) RW root
filesystem (with nothing but the base directories) and use the "vendor
script" capability of mkinitrd to get everything setup before control
gets passed to "init", but it required several more bind mounts than the
above method and would have been more tedious since we'd have to ensure
we re-ran "mkinitrd -V vendor.sh" anytime updates were applied.

Leland


Leland

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to