Peeling drywall paint, how to repaint?
It's a drag, but it sounds like you already know what you have to do: peel off everything that peels off easily. No use painting over an unstable substrate; the new paint will just peel off too and you'll have to start over. Might as well do it right the first time.