1) Bring a large pot of salted water to a boil. Add the spaghetti and cook until tender but still firm to the bite, stirring occasionally, about eight minutes Drain, reserving 240ml of the cooking liquid.
2) Meanwhile, heat two tablespoons of oil in a heavy large frying pan over medium heat. Add the onions and saute until tender and beginning to brown, about 15 minutes, adding salt and pepper, to taste. Stir in the marjoram and saute until fragrant, about one minute.
3) Add the cooked pasta to the skillet with the remaining two tablespoons of oil and toss with enough reserved cooking liquid, 60ml at a time, to moisten. Toss with the feta cheese. Season the pasta with salt and pepper, to taste.
Transfer to bowls and serve.