Preheat oven to 350 degrees.
Saute bacon and onion in saucepan until golden brown. Add flour, pepper, and salt; stir well. Slowly add milk. Cook on low for 5 minutes or until sauce thickens.
Place in greased pan alternating layers of sliced potato, sauce mix, and cheese, ending with cheese. Bake 30 minutes.