Preheat the oven to 350 degrees F (175 degrees C). Lightly grease a 9x13-inch baking dish.
Bring a large pot of salted water to a boil. Break spaghetti in half or thirds (this will make serving easier) and add the noodles to boiling water. Cook for 12 minutes, or until tender, stirring occasionally. Drain and return to the pot.
Meanwhile, cook beef and onion in a skillet over medium/high heat, stirring until meat is browned and onion is translucent, about 5 to 7 minutes. Drain excess fat and return to the skillet.
Add spaghetti sauce and salt to the meat mixture, stir until combined, then set aside.
In a large bowl, whisk eggs, Parmesan, and butter. Add spaghetti and toss to coat.
Place 1/2 of the spaghetti mixture in the prepared baking dish. Top with 1/2 of the ricotta cheese, 2 cups mozzarella, and 1/2 of the meat sauce. Repeat layers, reserving 1 cup of mozzarella..
Cover tightly with aluminum foil, and bake for 40 minutes.
Remove the foil and sprinkle with remaining 1 cup mozzarella.
Continue baking for 20 minutes until cheese is melted and lightly bubbly brown.
Serve and enjoy!