Mount on top of / ??

Bill Sconce sconce at in-spec-inc.com
Wed Mar 30 22:02:00 EST 2005


Here's a strange question, something (I hope) you've never thought
of doing.  A student asked me about it, and I said it's illegal.
But I was wrong...

What should happen (or what does happen) if you, as root,

    # mount -t ext3 /dev/hda9 /
    
assuming, of course, that the partition /dev/hda9 exists and is
correctly formatted as an ext3 filesystem?

I've tried it on FC1 and FC3.  And on Debian (2.4.20 kernel) I tried

    # mount -t iso9660 /dev/hdc /
    
(where /dev/hdc is a valid CD-ROM).

In all three cases the system executes the command and fails to
complain.  (I'm not saying that the system is still usable afterwards, 
only that the command doesn't cause an error message.)  It's not easy
to undo, either - trying "umount" generates "device is busy".  I don't
know how to explain what's happening, either to my student or to myself.

I googled, but haven't found anything yet.

What do you think?
Is mounting on / illegal?
Should it be?
If it's legal is there a realistic use case?

TIA -
Bill



More information about the gnhlug-discuss mailing list