Mac OS unable to boot with CD after Ubuntu installed
Hint

Command-Option-O-F alone, immediately after the startup sound: 


presents an Open Firmware prompt, only on Macs that use Open Firmware
does not reset NVRAM.


At an Open Firmware prompt you might enter a command such as reset-nvram – but it's not the usual approach. 

Advice

Use Command-Option-P-R as instructed in Apple's article: About NVRAM and PRAM.

Additional advice

If the optical disc is loaded whilst the Mac is powered off, then C – pressed immediately after the startup sound, and held – should allow the Mac to boot from a compatible disc. 

If the C key approach does not work – and if you have reset NVRAM/PRAM – then consider the possibility of a marginal optical drive and/or marginal disc. 

Don't rush to reset the SMC. 

Links

Apple's Transition from Open Firmware to Extensible Firmware Interface – MacTech | The journal of Apple technology. (2007)

What is firmware? – not a great article from Apple; it mentions Open Firmware but not EFI under a list of modern products that probably do not use use Open Firmware. 

"To continue booting, type 'mac-boot' and press return" Message

Intel-based Macs: Resetting the System Management Controller (SMC)