In a large pot, heat to boiling water, salt and olive oil included in A. Add spaghetti and boil rapidly for 13 minutes.
Meanwhile, in a caldero or heavy kettle, heat olive oil and brown ham rapidly. Reduce heat to low, add chopped onions, and sauté for 10 minutes, stirring occasionally.