What event in the history of the Earth allowed for the Earth to develop a magnetic field? *

the Earth was a big ball of lava
the Earth settled out in to layers; crust, mantle, outer core, inner core
the Earth has never had a magnetic field
The Earth started to hold oceans