Grease a 9-inch square baking dish. Set it aside for now.
Cook the macaroni until just al dente. You don't want them to be overcooked.
While the macaroni cooks, sauté the onion & mushrooms together with the butter in a skillet until the onions are just tender.
Sprinkle in the flour and stir them all together. Add in the milk and black pepper and bring this to a boil over medium heat, stirring continually. When it comes to a boil and thickens, turn off the heat.
Pour the sauce into a large (heat safe) mixing bowl. Add in the cooked macaroni, cheese cubes, and diced eggs.
Coarsely chop the dried beef and place it in a sieve. Run it under cold water to rinse the excess salt from it. Drain out the water and add the beef to the mixing bowl.
Stir everything together and spread it into your prepared baking dish.