On 18:31 15/07/02 +0100, Russell Coker wrote:
On Sun, 14 Jul 2002 19:38, David Gilbert wrote:
I've just started playing around with devfs and encountered an odd thing
(to me anyway)...
Once running, I noticed errors from the init scripts about trying to mount
/proc. I've disabled the explict mount of /proc to work around the
problem.
But what's going on? It seems that once devfsd is running there is an
implicit mounting of /proc? Is this normal behaviour?
You don't mention which distribution you're using, it's probably a
distribution issue.
No, I didn't mention which distro I use because I'm not using a
'packaged' distro - mine is based on Linux from Scratch (yes, I am
probably mad ;-)
Anyway, I've setup the init script so that running devfsd is the
first thing that happens on boot. Oh, I also mount devfs at boot
time (CONFIG_DEVFS_MOUNT=y). Finally, I'm not using any compatibility
mode in devfsd - just banging the kernel namespace directly (even
madder...)
My start script for Debian mounts /proc because that's the only way to
determine whether it's already running.
Why is this a problem?
Whoops! I wasn't suggesting it was a problem - I'm just trying to
understand better what's going on. I have a theory but I dont know how
the mechanics work:
When devfsd runs, it still creates some symlinks. This happens even
though I dont have any REGISTER .* MK[NEW|OLD]COMPAT entries in my
devfsd.conf. The key symlink in question is /dev/fd which is a symlink
to /proc/self/fd. Now, I assume to make the symlink the target must
exist (is this right?), therefore /proc needs to be mounted. So,
'magically' (Hmmm), /proc is mounted.
Unfortunately, this is where I run out of it.. I can't find any
references to mount(2) in the devfsd code.
So how is magic happening?? (I'm also an aetheist...)
Just to be sure I wasn't imagining things, I booted my kernel with the
'init=/bin/bash' option to bypass _all_ the init stuff. A quick check of
/proc proved that it was not mounted and a check of /dev showed no
/dev/fd. I then ran devfsd /dev and sure enough /dev/fd -> /proc/self/fd
appeared and /proc was mounted and ready.
Any ideas??
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
|