I started to play with Cyanogenmod ROMs on my Galaxy S I9000. I flashed CM 10.2.1 first and it worked fine. Then I tried to upgrade to CM 11 SNAPSHOT M4, everything fine. I switched back to CM 10.2.1 and repeated going there and back several times. Everything went fine until the phone did not connect to network after flashing CM11 and IMEI was "unknown".
I think I have tried all possible steps I found on the Internet (recovering EFS folder, going back to original firmware etc.), but I am lost in a cycle - I can flash original FROYO (2.2) with repartitioning, and connection to network is fine, IMEI is ok. I can upgrade it to the latest official version using Kies, IMEI ok. I root phone using CWM, everything fine. I flash custom firmware - no connection to network, IMEI lost. I always wipe cache etc between flashes.
Sometimes the lost IMEI reappears when I connect phone to the computer using USB cable, but it is lost again when I reboot. The phone also shows some minor issues like rebooting instead of turning off, showing battery icon when trying to turn it on etc.
Any idea what can cause this behavior?