iBook G4r system installation
Press the power button then hold the spacebar down.

If the keyboard is working, the system firmware will interpret that as a request to force eject the CD/DVD before continuing to start the OS.

Unless the firmware or hardware are faulty - then you might need to disassemble things to rescue the CD.