Thanks Rodrigo, saved me!
My iMac HDD have 3 ports in the back, SATA data, SATA power and a small one that looks like jumpers pins. When i removed the HDD there was a cable in it. Does anyone know what it is? I bought a new HDD and this port is slightly different. Thanks in advance.