How to restore my IMEI on Galaxy S if I don't have a backup of /efs? I installed CyanogenMod 10 Nightlies on my Galaxy S1, coming from CyanogenMod 9.
On every reboot I get the message:


  Warning! A problem was detected with your device. Your device IMEI number is invalid. And invalid IMEI number could cause network issues including the inability to call emergency numbers.


Sometimes I have network issues and my handy just won't connect to the Internet(even though it shows E/H Connection)

I once made a backup of my /efs/ partition, I already restored it but the message still appears.
FYI

The CyanogenMod 10 is the first update with the code to detect an invalid IMEI.
You could already have an invalid IMEI and don't know about it.
The issue with an invalid IMEI is that you may have emergency calling problems (inability to do emergency calls).

Confirm IMEI
Does the IMEI reported match the number under your battery?
Dial *#06# and the IMEI will be presented on your screen.

Possible Solution
From this code.google.com thread, the user at comment 5 managed to solve the issue:

Steps I took to solve the problem:

Flash my phone by Odin to version 2.2.1
Update to CM9 using Recovery with stabile version od CM9
http://download.cyanogenmod.com/get/jenkins/5805/cm-9.0.0-galaxysmtd.zip
Update to CM10 using last version of kernel.
I used cm-10-20120822-NIGHTLY-galaxysmtd.

Between steps I did wipe data/factory reset and wipe cache partition. Now my IMEI is correct.
After cleaning the phone and updates do CM10 I recommend installing gapps-jb-20120726-signed, because your phone will be clean as a baby after birth.