How many times does it beep? There is likely a RAM problem.
The power on self-test resides in the ROM of the computer. This test runs whenever the computer is turned on after being fully shut down (the power-on self-test does not run if the computer is only restarted).
If a fault is detected during the test, you will not hear a normal startup chime. Instead, the system will beep as explained below. If you experience one of these beeps, you may call your Apple Authorized Service Provider for additional troubleshooting assistance.
1 beep = no RAM installed
2 beeps = incompatible RAM types
3 beeps = no good banks
4 beeps = no good boot images in the boot ROM (and/or bad sys config block)
5 beeps = processor is not usable
In addition to the beeps, on some computers the power LED will flash a corresponding number of times plus one. The LED will repeat the sequence after approximately a 5-second pause. The tones are only played once.
There could be any number of reasons why your iBook done that. It could be something a simple as a loose or faulty memory module installed under your keyboard. What I suggest you try doing is resetting the PMU should this happen again. If you continue to experience this problem, then I would run he Apple hardware test just to get some diagnostics on this fault.
Best of luck