Add olive oil to a cast iron skillet.
Heat oil on medium and add sliced potatoes. Make sure they are all well coated with oil. Continue frying potatoes on a medium heat, only turning with a spatula every few minutes so potatoes will brown and be less likely to stick.
After about 10 minutes of frying, add onions to potatoes. Sprinkle with salt and pepper. Continue to fry until potatoes are tender all the way through. They should also be partially browned on the outside.
In a large bowl, add eggs and whisk until smooth.
Turn on broiler in oven.
Remove potatoes, onions, and oil from pan and add them to a bowl. Let them cool for a few minutes while you clean skillet.
Add some of the oil from the potatoes and onions back into the skillet making sure that the bottom and sides are covered well with oil.
Add potato mixture to egg mixture in bowl. Mix well. Add about ¼ teaspoon of salt and ground black pepper.
Add potatoes and eggs back into greased skillet.
Cook on medium heat until eggs begin to set on bottom.
Put skillet in top shelf of oven with broiler on. Cook until egg has set.
Check with a knife to make sure middle is cooked. If not, you can bake for a few more minutes at 350 degrees F until cooked all the way through.