so to clarify...
at the end of halo 2...
the second halo was deactivated by the allied forces of the humans, elites, hunters, and grunts. tartarus was killed, and upon halo's deactivation a signal was sent out to the arc.
the master chief managed to hitch a ride on the prophet of truth's convoy back to earth where a massive battle was underway.
meanwhile back on high charity which is now overrun by the flood, the gravemind mysteriously appears and announces it has questions, cortanna who was left behind, is ready to answer...
so now it seems that cortanna, having talked with the gravemind, is seriously messed up, the masterchief somehow makes his way to what we can only assume is the arc, along with the entire covenant fleet, and he gets his old gun back.