[pocket-linux] root double mounted?

David Horton pocket-linux@ufo.chicago.il.us
Fri, 30 May 2003 10:47:49 -0400


> I've done chapter 4 and when testing it I have rootfs and /dev/root
mounted on / does anyone know why this is?
> 
> My mtab tells me:
> rootfs        /        rootfs    rw ...
> /dev/root        /        ext2    ro ...
> 
> after running the script local_fs (which remounts / as rw) i have:
> rootfs        /        rootfs    rw ...
> /dev/root        /        ext2    rw ...
> 
> also df shows me both mounts for / (of course with the same values for
size and free disk space)
> In a newsgroup i found 
> -snip-
> Is your /etc/mtab a symlink to /proc/mounts ?  That is generally
> thought not to be a good idea.
> -snip-
> could that be the reason?
> 
> - Daniel
> 

The /etc/mtab symlink to /proc/mounts probably is the reason this is
happening although I have not seen it before.  You might try altering
the "local_fs" script to say "mount -n -o remount,rw /" instead of "
mount -o remount,rw /".  The "-n" option should stop mount from writing
an entry to /etc/mtab (which is actually /proc/mounts) when the rootfs
is remounted as read-write.  Maybe this will stop the double-mount
confusion.

Dave