I updated the patch to mount that makes it write to a symlinked /etc/mtab available at http://panopticon.csustan.edu/thood/readonly-root.html, It would be very useful to get this included in the ebuild (I am also going to submit this upstream) for people who use read-only root filesystems. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 62963 [details, diff] Patch that makes mount write to a /etc/mtab symlink
Created attachment 62964 [details] New ebuild for util-linux that applies the patch.
Created attachment 63637 [details, diff] new version of the patch that fixes a minor bug with umounting the root fs
Its got some changes to the manpage that I wont classify under this fix ...
I can take out the manpage modifications if you want, they were in the original patch, and I didn't see a reason to take them out.
I would rather please ... I am not too familiar with that code, and I think I'd rather check first with upstream what they think.
Created attachment 63980 [details, diff] Patch with the changes to the man page removed Here is a new version of the patch, with all the changes to the man page removed.
Update: did send upstream, but waiting on response (aparently our patches is quiued, but need some time to go through them).
Created attachment 68807 [details, diff] New version of the patch to apply against -r3 Updated version of the patch that applies correctly after the extra patches in util-linux-2.12q-r3.ebuild
ping
re-open if util-linux-2.13 does not satisfy your needs
I'm using sys-apps/util-linux-2.13-r2 and mount does not seem to work with a symlink. It does not complain about it but the linked mtab-file is never updated. For example: # cat /etc/mtab > /tmp/mtab && mount -t tmpfs -o size=256K none /mnt && diff /tmp/mtab /etc/mtab does not give any output ...
I can confirm what Roman Zimmermann said. With sys-apps/util-linux-2.13.1.1, mount does not update mtab if /etc/mtab is a symlink to a file elsewhere. What we want is for mount to treat the symlink as most programs do: simply follow it and update or read the actual file it points to. SpanKY said to re-open it if 2.13 doesn't satisfy our needs. How do we re-open this bug? I don't see any method to do so. Below the comment box is a radio button "Leave as RESOLVED FIXED" but there is no other option. Are only admins given a choice to reopen bugs?
To elaborate on what we need... we need mount/umount to write through a symlink at /etc/mtab UNLESS it points into /proc/...
Created attachment 162291 [details, diff] New version of the patch to apply against 2.13.1.1 I updated the patch to work against util-linux-2.13.1.1. I have tested it and it works, but this is the first patch of this type I've created... so check it if you feel uncomfortable.