1. Disconnect the negative battery cable.
2. Remove the headliner.
3. Disconnect the connector.
4. Remove the screws, and then remove the sunroof motor.

Sunroof unit disassembly/assembly
Sunroof motor installationMazda 6 Service Manual: SRS Air Bag Deployment Criteria
This chart indicates the applicable SRS equipment that will deploy depending
on the type of collision.
(The illustrations are the representative cases of collisions.)
X: The SRS air bag equipment is designed to deploy in a collision.
*1 (With Front Passenger Occupant Classification System) Th ...
Mazda 6 Service Manual: Rear drain hose installation
Caution
If the rear drain hose is pinched or bent anywhere, the water in the hose may
not discharge and enter the inside of the vehicle. During and after installation
of the trims and the headliner, always make sure there is no interference with
the rear drain hose. Fix any problem if foun ...