Soak the codfish in cold water to cover for 24 hours, changing the water from time to time. Then, drain.
Shred the codfish into small strips, removing any bones. Then, set it aside.
In a pan of medium heat, pour in 1/4 of the oil. Set the onions and garlic over the pan. Season with salt and pepper. Saute the ingredients until lightly browned, about 6 minutes.
Preheat the oven to 350 degrees Fahrenheit.
Grease a large ovenproof dish with 1 teaspoon of olive oil. Season the potatoes with salt and pepper.
Arrange half of the potatoes on the bottom of the dish. Add a portion of the salt cod over the potatoes. Lay half of the onion mix over the salt cod. Pile up the onion mixture with more salt cod.
Put another level of potatoes over the top of the salt cod. Sprinkle the entirety of the pan with the final quarter cup of oil.
Cook in the oven for 30 to 40 minutes, until golden. Place on a serving dish.
Serving Suggestions: Serve with sliced eggs, olives, and parsley.