The Crankshaft Position Sensor in the 6-cylinder M54 engine is located on the left rear of the engine block, beneath the intake manifold and starter motor. Ensure the ignition is off, then raise the car and support it safely. Remove the front end reinforcement plate. While working underneath the starter, cut off the wire tie securing the Crankshaft Position Sensor harness connector to the sensor and disconnect the harness connector. Remove the sensor mounting fastener and take out the sensor from the cylinder block. The installation process is the reverse of removal; use a new sealing O-ring when installing the sensor and replace the self-locking mounting bolt. Ensure the wiring is rerouted as it was originally. Finally, check for fault codes and clear and reset the ECM memory.