Use Saturn's rings as a shield
We just have to manuever Earth between Saturn and the GRB.
Or if by the time such an event happens we have a Dyson Shell for a solar system, that should do the trick.
Natural Space Mirrors Reflect Sun's Hidden Outbursts
http://www.space.com/scienceastronomy/050525_saturn_xrays.html
Scientists who study the Sun are constantly frustrated by the fact that they can
only see half of it at any given moment. Sunspots that grow, die and flare up on
the back side can't be monitored.
