Hide Forgot
Description of problem: mtab lives in /etc and it shouldn't live there but in /var/run because it holds session specific information and it keeps me from making etc readonly on a secured box. workaround, or probably fix would be to symlink /etc/mtab to /var/run/mtab. Version-Release number of selected component (if applicable): n/a How reproducible: make /etc read-only and make subsequently other mount commands Steps to Reproduce: 1. mount /etc mountpoint readonly 2. mount some other fs to some mountpoint 3. Actual results: it will complain Expected results: it won't complain Additional info: I want to build a system where all is readony exept for the /var et al. This is done for security, backup, provisioning, performance (r/o fs) and knowing exactly what the system looks like.
Thanks for your suggestion, but that's not something what should happen in released RHEL-6 ... in current Fedora /etc/mtab is just symlink to /proc/mounts ... however even this caused (and is still causing) a lot of troubles. Change you have described would probably mean some changes in SELinux policies and maybe more distro changes would be required. If you really think that you need this feature, please contact RHEL product support.
Just a side note from discussion with util-linux maintainer: "With /etc/mtab being symlink mount(8) will stop to update it properly, as it doesn't handle the symlink destination - with symlink it just doesn't care about that file. So to achieve this, you will need to update mount, umount and likely many other mount* tools. For read-only /etc/ is probably best way to use bind mount, however this is likely unsupported thing in RHEL." - see e.g. http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html for this topic...