[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New shmfs and Debian



On Mon, Apr 03, 2000 at 09:29:14PM +0200, Grendel wrote:
> ** On Apr 03, Ben Collins scribbled:
> 
> > > stage of startup - even before the init.d scripts are ran. I think it could
> > > go to /etc/init.d/rcS - so that it's a third thing done after init executes
> > > the script. But, isn't it better to put it once in the /etc/fstab and then
> > > forget about it? Even more so if you think that many people won't even
> > > _know_ that shmfs exists at the point they install the new kernel!
> > 
> > That fails one issue. Nothing is mounted automatically, except by the init
> > scripts in /etc/rcS.d/
> I think that this one is important enough to make it an exception and either
> mount it explicitly from some script in /etc/rc.boot, from rcS itself,
> make sure it is the first script ran from /etc/rcS.d/ or just put it in
> /etc/fstab. The latter is quite hard, now as I think about it - because it
> can be added to /etc/fstab only on a 2.3.x and newer kernels. That in turn
> means we'd need a script that'd watch the kernel version and if the release
> number would be higher or equal to 3 it would drop the line into /etc/fstab.
> But that solution is unclean. Adding /var/shm to base-files is trivial as it
> won't hurt anyone, but the rest isn't quite that trivial. Nevertheless, the
> entry in /etc/fstab must get there one way or another... The problem is that
> the user may decide to switch to 2.3.x or 2.4.x at any point and at that
> point he must have the entry or something _will_ fail...
> 

I don't know why you insist it must be added to fstab. If a script can
detect that the running kernel needs /var/shm mounted, then it can just
mount shm itself, no need to muck around with someones fstab. Simply write
a script (in fact, copy the devpts one and use that), and place make it
run at /etc/rcS.d/S30...

The only thing that runs before this is the network setup, / fsck, and
keyboard init. None of those need to be, or are using shared memory. In
fact, I have /var/shm *in* fstab with no scripts, and have no problems at
all (not EVEN when booting a 2.2.14 kernel that doesn't support shmfs).
The only thing it outputs is:

mount: fs type shm not supported by kernel

during the boot processes, but doesn't cause a failure of any kind.

So the timing of this during boot is not as critical as it seems. And it
also would not hurt to have this in fstab on systems that did not support
this filesystem (since even 2.3.x can be compiled without that support).
Just a minor (arguably irritating) message at bootup.

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`     bcollins@debian.org  --  bcollins@openldap.org  --  bmc@visi.net     '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'


Reply to: