Fry the pieces until well-cooked, then drain on paper towels.
Peel the potatoes, then grate them. To prevent the grated potatoes from discoloring while you prepare the other ingredients, you can put them into a bowl of cold water. When you're ready to use them, be sure to drain well and squeeze them dry.
Grate the cheese.
Mince the onion.
Butter a 9x13 shallow baking dish. Preheat the oven to 350 degrees.
Beat the eggs in a large bowl.
Add all the other ingredients and stir.
Pour the mixture into the baking dish and bake in the preheated oven for about 45 minutes, or until the eggs are cooked.
Serve hot, warm or at room temperature.
NOTES: You can prepare part of this ahead. You can cook the bacon, grate the cheese and potatoes and mince the onion the night before. Store all these things separately in the refrigerator, covering the potatoes with water. Then in the morning just mix it all up and bake it.