In a large skillet, heat 1 tablespoon of oil and sauté the onions over medium heat until they are tender but not brown. Remove the onions and set them aside.
I like to partially precook the potatoes. Put them whole with skins on in a pot of water, bring to a boil and boil them until the potatoes are about 1/2 cooked, probably about 5 or 7 minutes, depending on the size of the potatoes.
Peel and shred the potatoes or cut them into very small squares. Pat them dry on a paper towel. Heat 1 tablespoon of oil and 1 tablespoon of butter and spread half the shredded potatoes over the bottom of the skillet.
Sprinkle the potatoes with salt and pepper, top them with the onions, then add the remaining potatoes. Add salt and pepper to the top layer of potatoes.
Reduce the heat to medium low or low and for cook 10 minutes or until the bottom is brown and crisp. Turn upside down onto a plate.
Heat the remaining butter and oil and slide the potato cake back into the skillet and brown the second side for another 8 or 10 minutes.
Serve sprinkled with cooked pieces of bacon if you want and a dollop of sour cream.