Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 98403

Summary: patch to util-linux that makes mount write to /etc/mtab symlinks, as long as they don't point to /proc
Product: Gentoo Linux Reporter: Patrick McLean <chutzpah>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: enhancement CC: geckor, mereandor
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch that makes mount write to a /etc/mtab symlink
New ebuild for util-linux that applies the patch.
new version of the patch that fixes a minor bug with umounting the root fs
Patch with the changes to the man page removed
New version of the patch to apply against -r3
New version of the patch to apply against 2.13.1.1

Description Patrick McLean gentoo-dev 2005-07-08 14:51:25 UTC
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.
Comment 1 Patrick McLean gentoo-dev 2005-07-08 14:52:01 UTC
Created attachment 62963 [details, diff]
Patch that makes mount write to a /etc/mtab symlink
Comment 2 Patrick McLean gentoo-dev 2005-07-08 14:52:58 UTC
Created attachment 62964 [details]
New ebuild for util-linux that applies the patch.
Comment 3 Patrick McLean gentoo-dev 2005-07-17 12:56:43 UTC
Created attachment 63637 [details, diff]
new version of the patch that fixes a minor bug with umounting the root fs
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-20 09:18:35 UTC
Its got some changes to the manpage that I wont classify under this fix ...
Comment 5 Patrick McLean gentoo-dev 2005-07-20 15:37:57 UTC
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.
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-21 01:56:15 UTC
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.
Comment 7 Patrick McLean gentoo-dev 2005-07-21 06:32:26 UTC
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.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2005-08-31 08:45:56 UTC
Update: did send upstream, but waiting on response (aparently our patches is
quiued, but need some time to go through them).
Comment 9 Patrick McLean gentoo-dev 2005-09-19 07:20:38 UTC
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
Comment 10 Patrick McLean gentoo-dev 2005-12-09 22:39:50 UTC
ping
Comment 11 SpanKY gentoo-dev 2007-09-03 15:23:51 UTC
re-open if util-linux-2.13 does not satisfy your needs
Comment 12 Roman Zimmermann 2007-12-27 10:35:54 UTC
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 ...
Comment 13 Allen Fuller 2008-08-04 17:07:48 UTC
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?
Comment 14 Allen Fuller 2008-08-04 17:26:19 UTC
To elaborate on what we need... we need mount/umount to write through a symlink at /etc/mtab UNLESS it points into /proc/...
Comment 15 Allen Fuller 2008-08-05 19:16:28 UTC
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.