mounting ptoc

Brandon Peirce brandon_peirce at
Thu Aug 31 11:07:59 PDT 2006

dave frost wrote:

>somehting strange has happened, it seems mount reports proc is mounted 
>about 15 times, theres also loads of entries in /etc/mtab but /proc/mounts 
>reports /proc mounted only a single time.

The output of 'mount' without parameters is basically just a formatted dump 
of what's in /etc/mtab if it exists, so they will show the same thing.  
/proc/mounts reflects the actual state of the kernel.

>Any thoughts on why proc is being mounted so many times ?

It's should be mounted every time you boot your system!

>(note ive modified the init scripts but the mount command for proc is being 
>issued only once )

Check your shutdown sequence carefully.  Remember that 'umount -a' will 
unmount all filesystem, _except_ /proc. It will also remount your root 
filesystem read-only (because it can't really umount it). If you umount 
/proc after that, the entry will not be cleaned out of /etc/mtab because 
that is now on a read-only filesystem. Next time you boot, /proc will be 
mounted again and a new entry added to /etc/mtab, so now you have two. And 
every time you reboot another will be added....

Of course, I have not investigated your system so that's just my guess 
what's happening.  It's also possible that that happened during a period 
while you were testing your modified init scripts and now the problem is 
solved but the duplicate entries remain in mtab.

I suggest you clear out /etc/mtab once, then observe. If you get one more 
/proc entry each time you reboot, then you still have the problem, otherwise 
you don't. The safest way to clean out /etc/mtab is just to 'umount /proc' 
fifteen or so times, ignoring the warnings that it's not mounted, until 
there are no entries left, then mount it again once. (You'd best drop down 
to single-user mode, or at least stop services like klogd, if umount 
complains that proc is busy.)

Hope that helps,

More information about the lfs-support mailing list