Put the potatoes in a large saucepan and cover with water 1cm/½in higher than the potatoes. Cover with a lid and bring to the boil over high heat.
Reduce the heat slightly and simmer the potatoes for 5 minutes, or until tender but not falling apart. Drain in a colander and leave to stand for 5 minutes to dry the potatoes a little. (If using leftover cooked potatoes, you can leave this step out altogether and simply cut the potatoes into small chunks.)
Place a large non-stick frying pan, shallow wide-based casserole or sauté pan over a high heat. Add 2 tablespoons of the oil and fry the onion, bacon and potatoes together for 10 minutes or until lightly browned, stirring often. Add a little more oil if the potatoes begin to stick. Season with ground black pepper.
Reduce the heat to low, make four dips in the vegetables and crack an egg into each one. Cover the pan with a lid or large piece of kitchen foil and cook for about 5 minutes more, or until the egg whites are set and the yolks remain runny. (If the pan is over a high heat, the potatoes will burn before the eggs are cooked.)
While the eggs are cooking, heat the beans in a microwave or in a pan on the hob, according to the instructions on the tin. Serve the potatoes and bacon with the beans alongside.
