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: Sunroof relay inspection
Note
Sunroof relay is built in the sunroof motor.
1. Remove the headliner. (See HEADLINER REMOVAL/INSTALLATION.)
2. Connect the sunroof switch connector.
3. Measure the voltage at the sunroof relay terminals as indicated below.
4. Disconnect the sunroof relay connector before inspecting fo ...
Mazda 6 Service Manual: Engine control system operation inspection
Main Relay Operation Inspection
Verify that the main relay clicks when the ignition switch is turned to ON
position and off.
If there is no operation sound, inspect the following.
- Main relay (See RELAY INSPECTION.)
- Harness and connector between ignition switch and main relay termi ...