So the problem is you get an iBook used and you replace the hard drive which means there is now no OS on the computer. You want to boot the cd-rom but it doesnt boot.... why? Well, someone has set an Open Firmware password which means you are locked from ANY boot up options unless you have that password. Apparently, this can only be done on the correct phase of the moon and it must be raining and also it will not work on Sundays. Joking aside, here is what needs done:
You need to change the RAM. Either remove or add a stick, so the previous RAM amount is altered. Then ZAP the PRAM - hold down - command+option+P+R on reboot. Wait for at least 3 "chimes", then let go. In other words, it's not just a matter of changing the RAM, but changing it, then immediately zapping the PRAM.
After that, shut down the machine, reset the RAM to it's default slots, and try booting from the install CD (ie. hold down the "C" key on startup).
Hopefully that will let you get into the OS installer, and you can choose an "erase and install" to perform a fresh, clean install. Reference Link