Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 33764 - init scripts fail to mount /proc correctly according to /etc/fstab settings
Summary: init scripts fail to mount /proc correctly according to /etc/fstab settings
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-18 09:37 UTC by solar (RETIRED)
Modified: 2003-12-14 10:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/init.d/checkroot (checkroot,2.26 KB, text/plain)
2003-11-18 11:27 UTC, Martin Schlemmer (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description solar (RETIRED) gentoo-dev 2003-11-18 09:37:06 UTC
On grsec enabled kernels we have the option to enable a special proc group.

So we edit our /etc/fstab to add an extra gid option.

example fstab entry
proc	/proc	proc	defaults,gid=10	0 0
# reboot
# mount | grep proc
none on /proc type proc (rw)
## this should be
none on /proc type proc (rw,gid=10)

## simple fix that should be placed our initscripts.
mount -a -oremount /proc
## or perhaps
mount -a -oremount -t proc

Note: this is needed for our gentoo infrastructure
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-18 11:27:18 UTC
Created attachment 20921 [details]
/etc/init.d/checkroot

This should add corrrect additional info to /etc/mtab, please test.
Comment 2 solar (RETIRED) gentoo-dev 2003-11-20 16:53:03 UTC
After diffing out and extracting the
+		# Now make sure /etc/mtab have additional info (gid, etc) in there
+		for x in $(awk '{ print $2 }' /proc/mounts | uniq)
+		do
+			for y in $(awk '{ print $2 }' /etc/fstab)
+			do
+				if [ "${x}" = "${y}" ]
+				then
+					mount -f -o remount $x
+					continue
+				fi
+			done
+		done

Ran that from a shell script without the ^+ and the local= 
And it remounted my local partitions correctly. 
However I'm trying to not to reboot my box for a few weeks. So Kurt if have time to test :) 
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-12-14 10:22:49 UTC
Fixed in baselayout-1.8.6.12-r2.