SOS sound while starting MacBook Pro - Apple Community
MacBook Pro Beep SOS. Cannot start. - Apple Community
Macbook pro 13 inch mid 2009 S.O.S morce code 9 beeps - Apple Community
Unfortunately all those replies got it wrong. So did as all the other replies I was able to find on this site with an admittedly less than exhaustive search.
- The startup tones for corrupted EFI firmware are Morse for OSO not SOS as you are encountering. It is not related to RAM which is three beeps, pause, repeat.
Here is an archived version of an ancient Support document, but even it is confusing because it describes the LED behavior as the inverse of the tone behavior: About the Firmware Restoration CD (Intel-based Macs) (archived). Its age is applicable to that of your iMac (2007).
Excerpt (with emphasis):
Turn on the computer and continue holding the Power button. The sleep LED will blink rapidly, then slowly, then rapidly (3 quick blinks, 3 slow blinks, 3 quick blinks).
On Macs that don't have a sleep LED, tones are used instead. Hold down the power button until you hear 3 long tones, then 3 short tones, then 3 long tones.
As I said... inverse, which either means the Support document is wrong (wouldn't be the first time) or it really means what it says... but it still doesn't correspond to your Mac's startup tones.
In any event it appears to be firmware related, and unless you can find that Firmware Restoration CD you may be out of luck. I don't have one.