1. In a large bowl, combine flour and salt. Gradually add warm water, mixing until a dough forms. Knead the dough on a floured surface until smooth. Cover and let rest for 30 minutes.
2. Meanwhile, cook potatoes in a large pot of boiling salted water until tender. Drain and mash. Stir in cheese and season with salt and pepper.
3. Roll out dough on a floured surface to ⅛ inch thickness. Cut into circles using a glass or cookie cutter.
4. Place a spoonful of potato mixture in the center of each circle. Fold dough over filling and press edges with a fork to seal.
5. Bring a large pot of salted water to a boil. Add perogies in batches and cook until they float to the top, about 2-3 minutes. Remove with a slotted spoon.
6. In a frying pan, melt butter over medium heat. Add onions and cook until golden brown. Add perogies and fry until lightly browned on both sides.