How do I stop my pans from boiling over?
You are doing precisely the opposite of 'normal' procedure, which is to put the lid on the pan until the water starts boiling, then remove the lid (either partially or completely) to prevent boiling over. A reduction in the hob temperature will also probably be necessary, and is in any case desirable - mercilessly boiling any vegetable is rarely a good thing.

With the lid off, heat is lost at the top of the pan at a rate which is usually sufficient to prevent boiling over. With the lid on, much of the heat is retained, which A) helps the water come up to a boil quicker and B) causes it to boil over much more easily.

See this answer for more information.