Mounting /var to tmpfs - Dracut Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am working toward making a read-only filesystem, and setting aside the
merit and feasibility of that, I need to mount /var in tmpfs.  Of course
/var/log, spool, cache, lock, etc must be writeable, and we can't
anticipate what other areas of /var a given application might decide to
write to. (I've already resolved other parts of the filesystem)

I intend to mount /var, overlay. (a new feature in kernel 3.18+)  I
don't want the underlying /var to be written at all, even on boot, so I
think it stands to reason that this must be done in a dracut module,
maybe with a premount or mount hook.  Overlay mounts are a wonderful new
feature which much improves on union mounts.  In this case I want /var
on disk to be Under and read-only, and /var in tmpfs to be Over and rw.

The overlay mount commands are no problem.  But putting this action in
the right place in the boot process has me stuck.  Under Posix standards
I believe I'd put the script in /usr/local/lib/dracut/modules.d.  But
I'm not clear on dracut's process and how it assembles initramfs, nor
how to invoke the pre-mount hook.

Input appreciated.


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list




[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux