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: Bonnet adjustment
Gap Adjustment
1. Remove the front fender.
2. Loosen the bonnet hinge installation bolts and reposition the bonnet.
3. Tighten the bolts.
4. Verify that the gap between the bonnet and the body is within the
specification.
Clearance
a: 2.5-4.5 mm {0.08-0.17 in}
Height Adjustment
1 ...
Mazda 6 Service Manual: Sunroof unit disassembly/assembly
1. Disconnect the negative battery cable.
2. Remove the deflector.
3. Remove the glass panel.
4. Disassemble in the order indicated in the table.
5. Assemble in the reverse order of disassembly.
Slider Disassembly Note
1. Remove the screw.
2. Slide the slider rearward, and remove it fro ...