Re: Re: 7r5beta bug report (/etc/mtab)

From: Michele Andreoli (m.andreoli@tin.it)
Date: Mon Dec 27 1999 - 11:54:52 CET


On Mon, Dec 27, 1999 at 01:11:17AM +0000, Dave Houghton nicely wrote:
>
> >
> >How you discovered the bug?!
>
> in /etc/rc.4 after you set the PATH but immediately before you mount the "real" root file system add the following line:-
>
> rm -f /etc/mtab 2>/dev/null

The different behaviour is due to two concurrent ... autoexec.bat in
mulinux: /linuxrc and /etc/rc.4. Both mount root.

--- /linuxrc
        ... snip ..
> /etc/mtab
        mount -o remount,rw / 2>/dev/null
         .. snip ..

--- /etc/rc.4
        
        .. snip ..
        mount -o remount,rw / 2>/dev/null
        [ -z "$root_device" ] && mount -f /
        .. snip ..

In /etc/mtab ther is the list of mounted partition. RAM muLinux
execute in turn the two script. The istruction "mount -f /" means:
put only a relative entry in /etc/mtab. Maybe, this is the bad line:
the test do not works reliably.

To put a new "> /etc/mtab" in rc.4 is not a good idea, because
in one case /linuxrc mount a loop filesystem (LOOP muLinux), and
this action will destroy the mounted list.

On the other hand, to test this kind of script is difficult, because
simply the sustem hang!

>
> That's it, don't know why we didn't spot that one before !
> While we are talking about growing junk, after you remove /etc/mtab in rc.4 how about doing a file search of /tmp for files more than say three days old and remove them because on a cloned system /tmp rapidly becomes full of rubbish.. old chimera pages, temp modules,and loads of other odd bits+pc's. Nice thought but find=mufind=sed/tr script so we would have to add creation date parsing to find...Oh well :^(

Some cleanup is performed in /etc/rc.4, but only in /var/run/* and
/var/lock/*. I can add a "rm /tmp/*", but not a "rm -r /tmp/*".

I wan't remove the module cache /tmp/modules, because Setup search
for modules first in the cache, then try to unpack various archive.tgz.
Removing /tmp/modules works, but this make to boot more slow.

Michele

-- 
I'd like to conclude with a positive statement, but I can't 
remember any. Would two negative ones do?       -- Woody Allen
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:12 CET